Preheat the oven to 350°F (175°C). Grease a 9×13-inch casserole dish with butter or non-stick spray.
Bake the sweet potatoes: Scrub them clean, pierce with a fork, and bake for 45–60 minutes until tender. Once cool enough, scoop out the flesh and mash until smooth.
Prepare the base: In a large bowl, mix the mashed sweet potatoes with melted butter, brown sugar, eggs, milk, vanilla, cinnamon, nutmeg, and a pinch of salt. Stir until creamy and well blended.
Transfer to dish: Spread the sweet potato mixture evenly into the prepared baking dish, smoothing the top with a spatula.
Make the topping: In another bowl, combine pecans, flour, brown sugar, and melted butter. Mix until crumbly.
Assemble and bake: Sprinkle the topping evenly over the sweet potato layer. Bake uncovered for 25–30 minutes, or until the topping is golden and crisp.
Cool and serve: Let it rest for about 10 minutes before serving. The texture firms up slightly, making it easier to slice — though honestly, spoonfuls straight from the dish are just as heavenly.