As many schoolchildren, students and office workers suffering in the hot weather will testify, heatwaves really do fry your brain, a study has confirmed.

Harvard University scientists tracked students through a hot spell and examined the performance of individuals living in air-conditioned dormitories compared to those sweltering away in hot rooms.

They found participants from hotter buildings performed worse in problem solving and memory tests compared to those with air conditioning.

Data from this study and other experiments suggests humans work best at an optimum temperature, and the researchers recommended the roll-out of sustainable air conditioning systems wherever possible.

“This applies to kids in schools, office workers – and often we find that temperature levels are too hot because there is no air conditioning,” Dr Jose Guillermo Cedeno-Laurent, who led the study, told The Independent.

Previous work examining the effect of heatwaves on health and mental abilities has been restricted to the more vulnerable people in society, like the elderly and young children.

This has created the false impression that the average person is not at risk from heatwaves.

Given that higher temperatures are becoming the new normal as a result of climate change, this is a misconception Dr Cedeno-Laurent wants to dispel.

Students were monitored over the course of a particularly hot Boston summer in 2016 and were tested on their response times and mental arithmetic shortly after waking up.

During the heatwave, students in buildings without air conditioning performed on average 13 per cent worse at these tests than those in cooler rooms.

“The brain is the centre of control for every process in our life,” said Dr Cedeno-Laurent.

He explained that the integration of all the brain’s many functions appears to be negatively affected by hyperthermia – or high temperatures – resulting in poorer test scores.

Dr Cedeno-Laurent said this study – published in the journal PLOS Medicine – offered a real-life example of heatwaves hindering the abilities of otherwise healthy young adults.

However, while the findings are supported by experimental data, the fact that only 44 students participated means more work is required to assess how heat affects the brain.

“The number of participants is not very high, but a strength of the study is that the same participants were followed over time in different temperatures,” said Dr Iroise Dumontheil, a cognitive neuroscientist at Birkbeck, University of London, who was not involved in the study.

In addition, she added that more work is required to assess what other factors could impact mental performance besides the heat.

Professor Max Headley, a physiologist at the University of Bristol, said given the known impact of tiredness and thirst – both of which are obviously affected by hot, sweaty nights – on mental performance, the study has made “a mountain out of a molehill”.

“To my mind the observations can be readily explained by simple physiological factors that are entirely predictable. I can’t see that it’s anything to get excited about,” he said.

Nevertheless, Dr Cedeno-Laurent wants his research to inform a growing trend for advanced air conditioning that is both environmentally friendly and accessible to people in hotter parts of the world.

As it stands, air conditioning systems can create a “positive feedback” loop where emissions from the fossil fuels powering them and refrigerants seeping from them can both exacerbate global warming.

“We want to promote the control of temperatures while looking at how we do this in a sustainable way,” said Dr Cedeno-Laurent.