That is the finding of a study of 6,300 students in 40 states between 2004 and 2007. The study followed the students from the fifth to the eighth grade.
In recent years, states started passing laws banning snack foods or limiting the amount of sugar, fat or calories in them
The study said typical five-foot tall children in schools with no nutrition rules gained about two pounds more than children in schools with strict rules.
The study said it could not be sure that the rules made the difference, as school food plays only a small role in the diet of a child.
Advocates are trying to get the United States Department of Agriculture to issue standards for snacks and beverages in schools.