Popeye always has been the man when it comes to nutrition, spinach, olive oil etc etc. So he is living (fictional) proof that nutrition, and more precisely your macronutrients, play a significant part in the acquisition of lean mass.
The Food Standards Agency (2008) states the general recommendation for macronutrient ratios (Protein, Carbs and Fat) are around 50: 35: 15. Therefore you should try to get approx 50% of your calories come from carbs, 35% from fat and 15% from protein. In order to favourably shift this macro ratio to muscle building, try a 40% carbs, 30% fat and 30% protein ratio. For an average 2500kcal diet, this would equate to approx 1000kcal from carbs, 750kcal from fat and 750kcal from protein.