Preheat the oven to 350°F. Grease a 9x9-inch baking pan or line it with parchment paper.
In a large mixing bowl, combine the mashed sweet potatoes and melted butter. Stir in the brown sugar and granulated sugar until well combined.
Add the eggs and vanilla extract, mixing until smooth.
In a separate bowl, whisk together the flour, baking powder, baking soda, and salt.
Gradually add the dry ingredients to the sweet potato mixture, stirring until just combined. Fold in the chopped nuts if using.
Pour half of the batter into the prepared baking pan and spread it evenly. Drizzle half of the salted caramel sauce over the batter.
Pour the remaining batter on top and spread it out gently. Drizzle the rest of the caramel sauce over the top and use a knife to swirl it slightly.
Sprinkle flaky sea salt over the top of the batter.
Bake for 25-30 minutes, or until a toothpick inserted in the center comes out clean.
Allow the blondies to cool in the pan for at least 15 minutes before slicing into squares. For best results, let them cool completely before serving.