Preheat your oven to 350°F (175°C) and grease a 9x13-inch baking dish.
Boil the cubed sweet potatoes in a large pot for about 20-25 minutes until tender. Drain and mash them until smooth.
In a mixing bowl, combine the mashed sweet potatoes, coconut milk, maple syrup, melted coconut oil, vanilla extract, cinnamon, nutmeg, and sea salt. Mix until well combined and creamy.
Spread the sweet potato mixture evenly into the greased baking dish.
In a separate bowl, mix the chopped pecans, almond flour, melted coconut oil, maple syrup, cinnamon, and sea salt. Stir until everything is well coated.
Evenly sprinkle the pecan mixture over the top of the sweet potato layer.
Bake for 25-30 minutes, until the topping is golden and the sweet potato layer is heated through.
Let the casserole cool slightly before serving.