Preheat the oven to 350 degrees. Spray a 8x11 baking dish or pan with cooking spray and set aside.
Peel and cube sweet potatoes and place in a saucepan. Cover with water and cook over medium-high heat until fork tender. Drain well and transfer to large bowl.
Mash sweet potatoes with potato masher then add the melted butter, sugar, milk, vanilla, and beaten eggs. Mix until combined.
Pour into prepared baking dish smoothing lightly with a spatula then set aside.
For the topping combine the melted butter, brown sugar, flour and pecan pieces in small bowl.
Use your fingers and crumble topping evenly over the sweet potato casserole.
Bake for 25 to 35 minutes. Oven times vary. Sweet potato casserole should be lightly golden browned and set around the edges.