During the daytime when you're awake your body temperature tends to rise and fall which is normal.
When you go to sleep your body temperature begins to dip and fall which helps you to fall asleep since being cooler you're able to sleep better than when your body temperature is higher and you're warmer.
Just like being in a cooler room you sleep much better than when in a hot room.
As the morning comes around and your body is preparing to wake up then your body temperature begins to rise back to normal temperatures.