(CNN) -- Taking a hot bath or shower an hour or two before going to bed can greatly improve your sleep, according to new research from scientists at the University of Texas at Austin.
Human body temperatures follow a circadian rhythm that varies throughout the day, said Shahab Haghayegh, a Ph.D. candidate in the university's Department of Biomedical Engineering, who led the research. About an hour and a half before we usually go to sleep, our bodies cool by about 0.5 to 1 degree Fahrenheit.
One reason for the effect is that the hypothalamus in the brain regulates body temperature as well as a number of other functions, including the sleep-wake cycle.
Haghayegh said that warm water could stimulate the body's thermoregulatory system, ensuring or enhancing that natural cooling process.
According to his team's findings, published in the journal Sleep Medicine Reviews, a temperature of 104 to 109 degrees Fahrenheit can be ideal to maximize the effect.
The analysis shows that water-based passive heating can improve total sleep time, slow wave sleep, subjective sleep quality, sleep efficiency and sleep onset latency, or the amount of time it takes to fall asleep. The data shows that those who took baths were able to fall asleep on average 10 minutes earlier.
Researchers looked at past data through a new lens
The researchers combed through 5,322 studies on sleep and temperature that were published in science databases and then narrowed their scope to 17 papers that specifically sought quantitative data on the effect of water-based passive heating on a wide range of sleep metrics, including sleep onset latency. The team used statistical methods to perform a meta-analysis of the data.
Haghayegh emphasized that the sweet spot for warm baths was in the one-to-two-hour range and that taking a warm bath 15 minutes before bed was too soon to achieve the same effect.
Similarly, he said, the temperature zone of 104 to 109 degrees was important. Just as hot water has the inverse effect of making our bodies cool before sleep, taking a cold shower make our bodies warm up, making sleep more difficult.
Beyond helping us plan our evening routines to help us get the most rest, this science could help engineers design technology that could improve sleep even more.
Haghayegh said that researchers at UT-Austin's School of Engineering are using this data as they work to build a prototype water bed that would use water to help regulate someone's temperature and blood pressure and optimize sleep throughout the night.