Preheat the oven to 350°F (175°C). Grease a 9x5-inch loaf pan or line it with parchment paper.
In a large bowl, combine the mashed bananas, grated zucchini, oil, brown sugar, granulated sugar, eggs, and vanilla extract. Mix until well combined.
In another bowl, whisk together the flour, baking soda, baking powder, salt, and cinnamon. Gradually add the dry ingredients to the wet mixture, stirring just until combined. Avoid overmixing.
Fold in the nuts if using. Pour the batter into the prepared loaf pan.
Bake for 55-65 minutes, or until a toothpick inserted in the center comes out clean. Let it cool in the pan for 10 minutes, then transfer to a wire rack to cool completely.