Wash and peel sweet potatoes. Chop the potatoes into roughly equal-sized pieces.
Bring a large pot of water to boiling. Add the sweet potatoes and boil until soft (15-20 minutes).
Drain the sweet potatoes and add to the bowl of an electric mixer. Add the cinnamon, nutmeg, brown sugar, butter, and milk.
Start mixer on low, and gradually increase speed to medium. Mix until sweet potatoes are mashed and all <g class="gr_ gr_127 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" id="127" data-gr-id="127">intgredients</g> are incorporated well.
Lightly spray a 9x13 pan with cooking spray. Transfer mashed sweet potatoes to the pan and spread evenly.
Cover with aluminum foil and bake at 350 degrees for 30 minutes.
For the topping:
While the sweet potatoes are baking, mix the topping.
In a medium bowl, combine brown sugar, cinnamon, nutmeg, flour, and pecans. Stir well.
Add melted butter and stir well to combine.
After 30 minutes, remove the sweet potato casserole from the oven.
Remove the aluminum foil.
Sprinkle the brown sugar topping over the sweet potato casserole.
Evenly sprinkle the marshmallows over the brown sugar topping.
Return the sweet potato casserole to the oven (uncovered), and bake an additional 15-20 minutes, until the toppings are browned.