Sleep is crucial for brain health at any age but for youngsters, whose brains are still developing, it’s especially important. The time you put your child to bed – or more specifically, whether they have a regular bedtime – may affect cognitive development in the years to come.

A new study surveyed 11,000 children in England from all different socioeconomic strata whose families were part of the Millennium Cohort Study. Their parents were asked, via questionnaires and in-home visits, questions about lifestyle, including what time their kids went to bed at night at 9 months and 3, 5, and 7 years of age. When they were 7 years old, the children took tests to measure reading, math, and spatial awareness.

When kids had irregular bedtimes at all three time-points, they really ran into trouble…The effect may build up over time, so that lack of sleep via irregular bedtimes adds up over the years.

The team found some interesting, but not altogether straightforward, effects. At age 7, girls with irregular bedtimes tested lower than those with regular bedtimes on all three measures, though boys with irregular bedtimes at age 7 didn’t show much effect.

More telling perhaps is that children who had irregular bedtimes at age 3 had lower scores on all three measures at age 7; this was true for both sexes, and suggests sleep in the very early years may be especially important.

There seemed to be a cumulative effect as well. When kids had irregular bedtimes at all three time-points, they really ran into trouble. Girls had significantly worse performance on all three measures. Boys had significantly worse performance on the three measures when bedtimes were irregular for only any two of the three time-points.

The authors suggest that the effect may build up over time, so that lack of sleep via irregular bedtimes adds up over the years. Also noted was that kids from families of lower socioeconomic status tended to have less consistent bedtimes over the years.

The brain is highly plastic – that is, subject to change in response to various influences – especially when it’s laying down nerve tracks and making new connections in early childhood. And, the authors stress, the key to keeping the brain in this state is sleep.

“Sleep is the price we pay for plasticity on the prior day and the investment needed to allow learning fresh the next day,” they write. They conclude that, “reduced or disrupted sleep, especially if it occurs at key times in development, could have important impacts on health throughout life.”

That said, the study didn’t follow the kids into teenage years or adulthood, so it is possible, though somewhat unlikely, that the effect could diminish over time.

The bottom line is, get your sleep and make sure your kids get theirs, especially when they’re very young. Setting a consistent bedtime is important across childhood, and it’s made easier with bedtime routines set early in life: Baths, story time, and other rituals can make a big difference in getting them to get to bed, even if they beg to differ about what time that should be.

The study was carried out by a team at University College London, and published in The Journal of Epidemiology and Community Health.