Research has shown that late nights and lax bedtime routines can blunt young children's minds.
The findings on sleep patterns and brain power come from a UK study of more than 11,000 seven year- olds.
The findings showed that youngsters who had no regular bedtime or who went to bed later than 21:00 (9pm) had lower scores for reading and maths.
According to authors of the study, lack of sleep may disrupt natural body rhythms and impair how well the brain learns new information.
They gathered data on the children at the ages of three, five and then seven to find out how well they were doing with their learning and whether this might be related to their sleeping habits.
Overall, children who had never had regular bedtimes tended to fare worse than their peers in terms of test scores for reading, maths and spatial awareness. The impact was more obvious throughout early childhood in girls than in boys and appeared to be cumulative.
The researchers, led by Prof Amanda Sacker from University College London, said it was possible that inconsistent bedtimes were a reflection of chaotic family settings and it was this, rather than disrupted sleep, that had an impact on cognitive performance in children.
"We tried to take these things into account," said Prof Sacker. The children with late and erratic bedtimes came from more socially disadvantaged backgrounds and were less likely to be read to each night and, generally, watched more Tv.
Establishing a good bedtime routine early in childhood is probably best, but it’s never too late,” they note.