You're probably used to cooling off with a quick blast in a cold shower or grabbing drinks out the fridge to combat the summer heat. When temperatures reach heatwave levels, it can seem a little confusing to be told to hop in a hot bath - but experts say there is method to this madness.

According to Healthline, a study found that taking a hot bath about 90 minutes before bed could help people fall asleep more quickly. It sounds illogical to submerge yourself in hot water when it’s baking hot outside, but science backs up the theory.

The research was led by Shahab Haghayegh, a PhD candidate in the department of biomedical engineering at The University of Texas at Austin. The team conducted a systematic data analysis evaluating research linking bathing, water temperature, and sleep quality.

They reviewed 5,322 studies and used approximately a dozen with robust methodologies to draw their conclusions. Their findings suggest that taking a bath one to two hours - ideally, 90 minutes - before bed in water at 104 to 109F (40 to 43C) can help individuals achieve the best quality sleep.

Bathing at that specific time and temperature may help you fall asleep an average of 10 minutes quicker than usual.

Another report in the Sleep Medical Reviews journal found that both sleep and body core temperature is regulated by the brain’s circadian clock which drives the 24-hour patterns of sleep and wakefulness. Our body temperature is lowest while we are sleeping, and the drop in body temperature after a bath helps to prepare us for sleep.

With that in mind, taking a cool bath or shower before bed can do the opposite, leaving you destined for a restless night. Research is backed by the Sleep Foundation, which found that cold showers might not improve sleep because of cold water's stimulating properties that raise levels of cortisol and norepinephrine in the body.

Cortisol is involved in boosting alertness levels, and consequently, cortisol levels in the body usually fall in preparation for sleep. In one study, participants compared the energy boost of a cold shower to the effects of drinking caffeine.