Peel and cube the sweet potatoes, then boil in a large pot of water for 15-20 minutes until tender. Drain and cool slightly.
Mash the cooked sweet potatoes in a large mixing bowl. Add maple syrup, melted butter, milk, vanilla extract, ground cinnamon, ground nutmeg, and salt. Mix until smooth.
In a separate bowl, combine chopped pecans, brown sugar, and all-purpose flour. Mix until well blended.
Spread the sweet potato mixture in a greased 9x13-inch baking dish. Sprinkle the pecan topping evenly over the sweet potato layer.
Preheat oven to 350°F. Bake the casserole for 25-30 minutes until the topping is golden brown and the casserole is heated through.