But children were better at learning history in the afternoon.
That is because children are better at tasks that require perceptual understanding and insight later in the day.
History requires "perpetual-restructuring tasks", or those used to make sense of history in class, improved when it was moved to later in the day.
It indicates that by rearranging timetables, schools can improve students' results, said author Velichka Dimitrova.
"The findings indicate that afternoon classes lowered maths test scores and increased history test scores, which relate to psychology and neuroscience research about optimal functioning in different times of the day," the study concludes.
Ms Dimitrova said: "Rearranging school schedules in a more optimal way does not require investment of additional resources and could be a cost-effective intervention leading to improvements in academic performance."
The research was presented today at the Royal Economics Society annual conference held at the University of Bristol.