Preheat the oven to 350°F (175°C). Grease a 9x5-inch loaf pan or line with parchment paper for easy removal.
In a large mixing bowl, thoroughly mash the ripe bananas using a fork or potato masher until smooth.
Stir the melted butter into the mashed bananas. Add granulated sugar and mix until well combined and slightly lighter in color.
Beat in the eggs one at a time, ensuring each is fully combined before adding the next. Stir in the vanilla extract.
In a separate bowl, whisk together the flour, baking soda, salt, cinnamon, and nutmeg until evenly distributed.
Gradually fold the dry ingredients into the banana mixture using a gentle motion. Mix just until no streaks of flour remain.
Fold in chopped walnuts or pecans if using, distributing them evenly through the batter.
Pour the batter into the prepared loaf pan and spread it evenly. Tap the pan on the countertop once or twice to remove large air bubbles.
Bake in the preheated oven for 55 to 65 minutes. The bread is ready when a toothpick inserted into the center comes out clean or with a few moist crumbs.