Preheat the oven to 350°F (175°C) and grease a 9x13-inch baking dish.
Prepare the sweet potatoes: Peel and cook the sweet potatoes (either boil them until tender or roast them in the oven). Once soft, mash them until smooth.
Make the casserole mixture: In a large mixing bowl, combine the mashed sweet potatoes with the granulated sugar, brown sugar, melted butter, milk, eggs, vanilla extract, cinnamon, nutmeg, and salt. Mix everything together until smooth and well-combined.
Transfer to baking dish: Pour the sweet potato mixture into the prepared baking dish and spread it evenly.
Prepare the topping: In a small bowl, mix together the mini marshmallows, chopped pecans, and melted butter (if using).
Bake the casserole: Bake the casserole in the preheated oven for about 30 minutes.
Add the topping: After 30 minutes, remove the casserole from the oven and sprinkle the marshmallow-pecan topping evenly over the casserole. Return to the oven and bake for an additional 10-15 minutes, or until the marshmallows are golden brown and the topping is bubbly.
Serve and enjoy: Allow the casserole to cool slightly before serving. It’s the perfect side dish for holiday meals!