Preheat the oven to 375°F (190°C). Grease a 9x13-inch baking dish or equivalent.
Wash the sweet potatoes and pierce them a few times with a fork. Place on a baking sheet and roast for 45–60 minutes, until tender when pierced with a knife. Alternatively, peel and cut into chunks and boil until soft, about 20–25 minutes.
When the sweet potatoes are cool enough to handle, peel if roasted, or drain if boiled. Transfer to a large bowl and mash until mostly smooth. A few small lumps are fine — they add texture.
Add 1/2 cup softened butter, 1/3 cup brown sugar, 1/4 cup milk, 1 teaspoon vanilla, 1/2 teaspoon cinnamon, 1/4 teaspoon nutmeg, and 1/2 teaspoon salt to the mashed sweet potatoes. Stir or beat until creamy and well combined. Taste and adjust sweetness or seasoning if needed.
Spoon the sweet potato mixture into the prepared baking dish and smooth the top with a spatula.
Make the candied pecans: In a small skillet, melt 2 tablespoons butter over medium heat. Add 1 cup chopped pecans and 1/4 cup granulated sugar. Cook, stirring frequently, until the sugar melts and coats the pecans, about 3–5 minutes. Transfer the pecans to a sheet of parchment to cool briefly.
Sprinkle the candied pecans evenly over the sweet potato layer. Scatter 1 cup mini marshmallows over the pecans.
Bake the casserole at 375°F (190°C) for 12–15 minutes, until the marshmallows are golden and puffed and the filling is heated through. If you want extra browning on the marshmallows, place the dish under the broiler for 1–2 minutes — watch closely so they do not burn.
Remove from the oven and let the casserole rest for 5 minutes before serving. The pecans will crisp up as they cool.