Preheat the oven to 350°F (175°C).
Prepare a muffin tin with liners or grease it lightly.
In a large mixing bowl, combine mashed sweet potatoes, granulated sugar, brown sugar, oil, eggs, and vanilla extract.
In a separate bowl, whisk together flour, baking powder, baking soda, cinnamon, nutmeg, and salt.
Gradually add the dry ingredients to the wet mixture, stirring until just combined.
Fold in the nuts, if using.
Scoop the batter into the prepared muffin tin, filling each cup about 2/3 full.
Bake in the preheated oven for 20-25 minutes, or until a toothpick inserted into the center comes out clean.
Once done, allow the muffins to cool in the tin for 5-10 minutes before transferring them to a wire rack.
Serve warm or at room temperature, and enjoy!