Mash the very ripe bananas with a fork in a small bowl until mostly smooth with just a few small lumps remaining—this texture creates the best crumb in banana bread. Melt the butter and let it cool to room temperature; this prevents the eggs from cooking when combined. Ensure eggs are at room temperature as well, which helps them emulsify properly with the wet ingredients for a more tender crumb. Chop walnuts into roughly 1/4-inch pieces if using. Measure out all dry ingredients (flour, baking soda, baking powder, salt, cinnamon, and nutmeg) and set aside separately from the wet ingredients.
Add the mashed bananas to your bread machine pan first, followed by the cooled melted butter. Crack in the room-temperature eggs and add vanilla extract. Stir these wet ingredients together briefly with a spoon until just combined—you don't need to beat them, as the bread machine will do the mixing work. This layering method helps the machine incorporate all the wet ingredients evenly when it starts its first cycle.
Pour the brown sugar over the wet ingredients in the pan, spreading it evenly. Then add the dry ingredient mixture (flour, baking soda, baking powder, salt, cinnamon, and nutmeg) on top of the sugar. I like to add the dry ingredients last and slightly mounded so the bread machine's initial mix cycle can properly incorporate everything without overworking the batter. Do not stir; let the machine handle the mixing.
Close the bread machine pan lid and select the Quick Bread or Cake setting with Light Color option. Press start to begin the cycle. After the machine completes its first mixing cycle (usually 2-3 minutes), open the lid and add the chopped walnuts if using. I find that adding nuts after the initial mix prevents them from breaking apart too much, which keeps them crunchier throughout the bread. Close the lid and allow the machine to continue its baking cycle.
Allow the bread machine to complete its full baking cycle, which takes approximately 1 hour and 20 minutes. Once the cycle finishes, the bread machine will beep to alert you. Remove the pan from the machine and let the banana bread sit in the pan for 10 minutes—this resting period allows the interior to set slightly, making it easier to remove without breaking.
Carefully turn the pan upside down onto a cooling rack, gently tapping the bottom and sides to release the bread. If it doesn't release easily, run a thin knife around the edges and try again. Let the banana bread cool completely on the rack for at least 2 hours before slicing—this allows the interior to continue setting and makes for cleaner, more attractive slices. Cutting too early will result in a slightly gummy crumb, so patience here pays off.