Preheat your oven to 350°F (175°C).
Peel and boil the sweet potatoes until tender, then drain and mash.
In a large bowl, combine mashed sweet potatoes, granulated sugar, milk, melted butter, eggs, vanilla extract, cinnamon, and nutmeg.
Transfer the sweet potato mixture to a greased baking dish.
In a separate bowl, mix chopped pecans, brown sugar, flour, and melted butter for the topping.
Sprinkle the pecan topping evenly over the sweet potato layer.
Bake in the preheated oven for 30-35 minutes or until the topping is golden brown.
Remove from oven and let it cool slightly before serving.