Preheat the oven to 375°F (190°C). Grease a 9x13 inch baking dish.
Boil the sweet potatoes: In a large pot, cover the cubed sweet potatoes with water and bring to a boil. Reduce heat and simmer until tender, about 15-20 minutes. Drain and return to the pot.
Mash the sweet potatoes: Using a potato masher or electric mixer, mash the sweet potatoes until smooth.
Sweeten and spice: Add the softened butter, brown sugar, vanilla extract, cinnamon, nutmeg, and salt to the mashed sweet potatoes. Mix well until fully incorporated.
Creamy touch: Gradually add the milk while mixing until you reach your desired consistency. Aim for a smooth and creamy texture.
Assemble the casserole: Pour the sweet potato mixture into the prepared baking dish.
Pecan perfection: In a small bowl, combine the chopped pecans, brown sugar, melted butter, and cinnamon. Mix well and sprinkle the pecan topping evenly over the sweet potato base.
Bake to golden: Bake the casserole for 30-35 minutes, or until the top is golden brown and the center is heated through.