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.

UK weather: Temperatures soar as heatwave intensifies Show all 35 1 /35 UK weather: Temperatures soar as heatwave intensifies UK weather: Temperatures soar as heatwave intensifies People on the beach at Croyde Beach in North Devon PA UK weather: Temperatures soar as heatwave intensifies People enjoy the sun at Carsington Water in Derbyshire PA UK weather: Temperatures soar as heatwave intensifies Sophie Todd, aged 7, and her mother Jane Todd playing in one of the Trafalgar Square fountains in London PA UK weather: Temperatures soar as heatwave intensifies A couple play catch with a ball whilst swimming in the River Stour Getty Images UK weather: Temperatures soar as heatwave intensifies Children play in the fountains at Granary Square, King's Cross PA UK weather: Temperatures soar as heatwave intensifies A dog under an umbrella at the Festival of British Eventing at Gatcombe Park, Gloucestershire PA UK weather: Temperatures soar as heatwave intensifies People sunbath on the clifftop at Woolacombe Beach in North Devon PA UK weather: Temperatures soar as heatwave intensifies A woman stands in a field of sunflowers at Vine House Farm near Spalding, Lincolnshire PA UK weather: Temperatures soar as heatwave intensifies A woman takes a selfie in front of St Paul's Chathedral PA UK weather: Temperatures soar as heatwave intensifies Paddle boarders off the coast at Tynemouth , Tyne & Wear PA UK weather: Temperatures soar as heatwave intensifies People on Woolacombe Beach in North Devon PA UK weather: Temperatures soar as heatwave intensifies A canal boat passes along the Regent's Canal PA UK weather: Temperatures soar as heatwave intensifies People relax in the warm weather on the beach in Brighton PA UK weather: Temperatures soar as heatwave intensifies People enjoying the hot weather and sunshine on the banks of the River Thames in Putney Rex Features UK weather: Temperatures soar as heatwave intensifies Spectators enjoy the hot weather during day seven of the Nature Valley International at Devonshire Park PA UK weather: Temperatures soar as heatwave intensifies Hot and sunny day in Hyde Park's Serpentine lake Rex UK weather: Temperatures soar as heatwave intensifies People relax in the warm weather on the beach in Eastbourne PA UK weather: Temperatures soar as heatwave intensifies People sunbathe as they enjoy the warm weather on Bournemouth beach PA UK weather: Temperatures soar as heatwave intensifies A person sunbathes on a blow up mattress in the sea off of Bournemouth beach in Dorset PA UK weather: Temperatures soar as heatwave intensifies A couple relax in the sunshine on the beach in Brighton PA UK weather: Temperatures soar as heatwave intensifies People play in water fountains in the Queen Elizabeth Olympic Park in east London PA UK weather: Temperatures soar as heatwave intensifies Chris Bryant from Basingstoke paddle boards at Boscombe Beach in Dorset PA UK weather: Temperatures soar as heatwave intensifies People shelter from the sun beneath umbrellas as they walk in St James's Park in London AFP/Getty Images UK weather: Temperatures soar as heatwave intensifies Arianna Espiritu Kelly, 2, eats an ice-cream in the Queen Elizabeth Olympic Park PA UK weather: Temperatures soar as heatwave intensifies Victor the Polar Bear enjoys a dip in the water at Yorkshire Wildlife Park PA UK weather: Temperatures soar as heatwave intensifies People on the beach in Brighton PA UK weather: Temperatures soar as heatwave intensifies Woman relax in the sunshine on the beach in Hastings, Sussex PA UK weather: Temperatures soar as heatwave intensifies People enjoy their lunch break in the sunshine near Tower Bridge in London PA UK weather: Temperatures soar as heatwave intensifies Police horses drink from a water fountain during the hot weather in Green Park PA UK weather: Temperatures soar as heatwave intensifies Anglers fish on New Brighton beach on the Wirral, Merseyside as the sun rises over the Port of Liverpool and the River Mersey PA UK weather: Temperatures soar as heatwave intensifies A family of lemurs enjoy an ice lolly at Yorkshire Wildlife Park PA UK weather: Temperatures soar as heatwave intensifies People enjoy the sunshine in St James's Park in in London AFP/Getty Images UK weather: Temperatures soar as heatwave intensifies A duck swims in the algae covered lake in St James's Park, London PA UK weather: Temperatures soar as heatwave intensifies A couple cycle in the sunshine around Bewl Water in Kent PA UK weather: Temperatures soar as heatwave intensifies A man takes a break in the sun on Southbank, London PA

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.

Drone video shows Saddleworth Moor fire raging in UK heatwave

“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.