Place the sweet potatoes in a large pot and cover with water. Bring to a boil, then reduce to a simmer and cook for 15–20 minutes, until fork-tender.
Drain the sweet potatoes well and transfer them to a large mixing bowl.
Add the brown sugar, butter, milk, eggs, vanilla extract, and salt. Mash until creamy and well combined.
Spread the sweet potato mixture evenly in a well-greased 9-inch deep pie dish and set aside.
For the topping:
Combine the brown sugar, flour, and cinnamon for the topping. Stir in the butter with a fork until the mixture is crumbly, then stir in the pecans.
Distribute the brown sugar pecan topping evenly over the sweet potato mixture.
Bake at 375°F (191°C) for 25–30 minutes, until the casserole is slightly puffed and the topping is golden brown.
Remove from the oven and let rest for 10 minutes before serving.
Notes
Use a hand masher for a more rustic sweet potato filling or a hand mixer for a smoother texture. If using a mixer, stop as soon as the filling is smooth and combined.
Toast the pecans before adding them to the topping for a deeper, nuttier flavor.
To make ahead, prepare the sweet potato filling and refrigerate it covered. Keep the topping separate and add it just before baking. Allow a little extra baking time when baking the casserole cold.
For a smaller casserole, halve the recipe and bake it in an 8×8-inch baking dish. Begin checking for doneness a little earlier.
Store leftovers covered in the refrigerator for up to 4 days. The baked casserole can also be frozen for up to 3 months; thaw overnight in the refrigerator before reheating.