Heat the oven to 400°F. Prick the sweet potatoes, place on a lined baking sheet, and roast 50–60 minutes until very tender.
Cool 10–15 minutes, then scoop the flesh into a large bowl. Lower the oven to 350°F.
Mash until smooth.
Mix in the brown sugar, melted butter, milk, eggs, vanilla, cinnamon, nutmeg, and salt.
Spread in a greased 3-quart round baking dish.
For the topping, mix brown sugar, flour, and salt; cut in cold butter until clumpy; stir in pecans. Scatter over the filling.
Bake 30–35 minutes until golden and bubbling at the edges.
Rest 10 minutes before serving.