Preheat the oven to 350°F degrees. Grease a 9×13-inch baking dish and set aside.
Add the cooked sweet potatoes, brown sugar, butter, cinnamon, vanilla, milk, egg, and salt to a large bowl and mash with a potato masher. You can use a hand mixer as well if you wish. Spread the mashed sweet potatoes in the prepared casserole dish and bake for 30 minutes.
While the casserole is baking, add the cornflakes, pecans, butter, and brown sugar to a medium size bowl and toss everything together. Top with marshmallows in the center of the casserole, then sprinkle the cornflake mixture around the marshmallows.
Place the dish back in the oven and bake for another 10 minutes or until the marshmallows are puffed and golden brown.