As part of our normal circadian (daily) rhythm, our bodies cool in the middle part of the evening and cool further while we sleep. If you find it hard to get off to sleep it may be because your body's internal thermostat is set too high, or because your circadian rhythm is running late. There is some evidence that deliberately cooling your body down, for instance by having a lukewarm bath or shower before bed, may correct the problem and help you get to sleep.
This is a companion discussion topic for the original article at https://patient.info/news-and-features/whats-the-right-temperature-for-sleep