Eating a well-balanced diet as well as getting adequate rest is essential is the body repairing itself as well as growing.
One would also take into consideration the needs of the individual.
I recognized that this is a site specifically for individuals in the fitness industry, however, our audience may be comprised of others who read our answers.
Hence, is the one in need of building muscles an individual who is elderly or are we speaking about a conditioned athlete.
As a general answer, a balanced diet that includes the appropriate amounts of the building blocks of protein–amino acids and rest.