Not just math, but reading too.  

Going to bed at different times every night reduces children's brainpower.

11,000 children in the United Kingdom had their family routines, including bedtimes, recorded when they were aged 3, 5 and 7. At age 7, the children were given tests to assess their math and reading skills and spatial awareness.

Irregular bedtimes were most common at age 3, when around one in five children went to bed at varying times. By the age of 7, more than half the children went to bed regularly between 7:30 p.m. and 8:30 p.m.

At age 7, girls who had irregular bedtimes had lower scores on all three tests than girls with regular bedtimes. This was not the case among 7-year-old boys.

Irregular bedtimes at age 5 were not associated with poorer brainpower in girls or boys at age 7. But irregular bedtimes at age 3 were associated with lower scores in reading, math and spatial awareness in both genders, suggesting that around the age of 3 could be a sensitive period for the development of mental skills.