Sleep scientists say the power of a warm bedtime bath to trigger sleepiness likely has to do, paradoxically, with cooling the body’s core temperature.

Research literature on the topic, published in the August issue of Sleep Medicine Reviews, suggests that either a warm bath or shower before bed can help a person fall asleep and improve sleep quality — even in the heat of summer. And the optimum time to take one might be an hour or two before going to bed.

The method is thought to work by augmenting the body’s temperature rhythm over 24 hours. Our core body temperature changes throughout the day, as governed by an inborn body clock (though this clock can shift for people who have circadian rhythm disorders, work the nightshift or are jetlagged.) We tend to gradually cool by evening time, before we go to sleep. Augmenting that natural cooling of the body’s core temperature, apparently, may be a way to promote sleep.