A study led by researchers Jinshia Ly, Jennifer J. McGrath and Jean-Philippe Gouin from Concordia University’s Centre for Clinical Research in Health and the PERFORM Centre shows that poor sleep might explain how stress impacts health in kids.

Getting a good night’s sleep might buffer the impact of stress on kids’ cortisol level, which is a hormone produced in the adrenal gland to regulate the body’s cardiovascular, metabolic, and immune systems. While short-term exposure to cortisol prepares the body for the “fight or flight” response, long-term exposure to cortisol can put people at risk for health problems, like heart diseases, weight gain, and depression.

Jinshia Ly, lead author and graduate student, says in a release: “Sleep researchers distinguish sleep duration, or how long one spends sleeping, from sleep quality, or how well one sleeps. Sleeping throughout the night without waking up, feeling rested in the morning, and absence of sleep problems, such as nightmares, apnea, and snoring, are examples of a better quality sleep.”

For the study, which was published in Psychoneuroendocrinology, the research team recruited 220 kids aged 8 to 18 years old. The participants gave saliva samples from which their cortisol levels were measured.

The kids and their parents also answered questions about stress, sleep habits, and bedtime routines. The researchers found that poorer sleep quality, regardless of how long kids spent sleeping, promoted the negative effects of stress on their cortisol levels.

So what are the implications for parents, as the school year starts and stress likely increases for kids? Better sleep, combined with other healthy lifestyle behaviors, can reduce the negative consequences of stress on kids’ cortisol levels. They should sleep 8 to 9 hours each night.

“But it’s even more important that they get to bed early with regular sleep and wake times, avoid napping during the day, and avoid using electronic devices before bedtime. It is also important that parents educate their kids at an early age about the importance of consistent and healthy sleep habits,” says Ly.

This solid grounding can help kids make better choices when they gain greater autonomy in setting their bedtime routines as they get older.