Summer is the season when children play outdoors tirelessly until nightfall, burning up all the energy they had stockpiled throughout the school year, right?

Reality check: According to a new national study of younger elementary school students, the risk of gaining excessive weight is far greater during the summer than when they are in school.

A nationally representative sample of 18,170 kindergartners was weighed in the early fall and again in the late spring from 2010 through 2013, when the children were finishing second grade. The prevalence of children who were overweight increased to 28.7 percent from 23.3 percent. The prevalence of those who measured as obese grew to 11.5 percent from 8.9 percent. Most strikingly, according to the study published Wednesday in the journal Obesity, all of the increases were during the summer breaks. No increase in the prevalence of being overweight or obese was seen during the school year.

“It’s dispiriting how little progress we can see as a result of all these school-based fitness and nutrition programs,” said Paul von Hippel, the lead author and an associate professor of public affairs at the University of Texas at Austin.

He was referring to initiatives such as soda bans, recalibrated school cafeteria food, and more attention to physical education and nutrition curriculums.

“But it makes sense if you believe that schools were never the problem to begin with. Nor can they be much of the solution,” added von Hippel, who said that family education and access to summer fitness programs needed to be bolstered.

The research is the most rigorous and long-term in a growing collection of evidence suggesting that children’s ability to maintain a healthy weight can slip when they are out of school, much like their reading and math skills.

The complex factors that contribute to this phenomenon are only beginning to be examined. Experts note that in the summer, children do not have a strict, school-defined schedule, so they spend more sedentary time snacking in front of screens. They go to bed later and get less sleep (which can contribute to weight gain). And because heat renders them sluggish, they can be less active.

By contrast, despite school’s limitations, it offers a built-in protective structure for weight-and-fitness maintenance. During the academic year, meal times at home and school become more fixed; sleep is better regulated; physical education and recess, however minimal, is in the schedule; and, most critically, by being in class during the day and doing homework afterward, students have less time for screens.

Dr. Natalie Muth, a pediatrician and dietitian in Carlsbad, California, whose practice includes a healthy weight clinic, frequently sees children who struggle with summertime weight gain. One challenge for many during those months, she said, is that they are not getting free school lunches, which may be healthier than those they eat at home.

Another, she added, is that while parents are working, they turn to other caregivers, who may not follow the family’s school-year regimen. “Grandparents love to use food as rewards,” Muth said.

The obesity rates will continue to remain high, von Hippel said, “until we get serious about reducing screen time and confronting food marketing practices outside of school.”

Von Hippel first noted this trend in a shorter study published in 2007, in which he examined results from the federal Early Childhood Longitudinal Study in which federal researchers collected statistics over time on a wide range of issues that could relate to school performance.

In 2014, a study by Harvard researchers, published by the Centers for Disease Control and Prevention, summarized the results of seven smaller summer-weight-gain studies. It found that some minorities might be more vulnerable to gaining weight, and it raised concerns about long-term health implications. The new research found no significant difference either by race or income in summer’s effect. Like the CDC, the new Obesity report also encouraged more access for children to recreational facilities and physical activity programming in the summertime.

“We put so many resources into fine-tuning healthy school curriculums, and then we send children off for three or four months with very little in terms of resources. So why do we think children’s development only happens part of the year?” said Amy Bohnert, an associate professor of psychology at Loyola University Chicago and the lead author of a chapter on obesity in a new book, “The Summer Slide: What We Know and Can Do About Summer Learning Loss.”

Schools could begin conversations with children and families earlier in the year about summer routines, she said, noting, “Kids are sent home with summer reading lists, so we need to send a message that this is important, too.”

Amy Moyer, a registered dietitian with Action for Healthy Kids, which supports health-based programs around the country, said schools still play a critical role in educating children about nutrition. “Schools are in the unique position of modeling healthy behaviors and supporting kids and their families in making healthy choices,” she said.

Experts say that schools are assuming an increasing burden in educating children about the many risks in modern living, but community and statewide organizations also need to step up their involvement. A key player, they add, is the pediatrician.

Dr. Teresia O’Connor, an assistant professor of pediatrics at the Baylor College of Medicine, who researches childhood nutrition and obesity, wonders whether parents tend to be more lenient with behavioral rules in the summer. In her practice, she said, “We’ve been starting to talk with parents in the late spring about what they can do to help their child maintain healthy behaviors that they do during the school year, when school lets out.”