When we are inside the room , there is less loss of heat from our body to our surroundings so we feel cold. Now, when we go outside our body loses more heat and while returning inside the room our body loses comparatively less heat energy . So, we feel warm.
The main driver here is light, which regulates your circadian rhythms, aka your sleep/wake cycle. Exposure to light, and blue light in particular, hits specialized receptors in your eyes, which then send this signal to the brain's hypothalamus.You get cold when you sleep due to your body's core temperature. This is usually 36°C to 39°C, however it drops a degree or two overnight. This is a natural response due to a lack of exposure to light and lets your body know it's time to rest.You're more sensitive to cool or warm temperatures during NREM stages of your sleep cycle, and thus more likely to wake up if you feel too hot or too cold.
Body temperature is always higher in the late afternoon and early evening and lower in the early morning. Doctors consider a temperature of 100.4 degrees or greater to be a fever. The gold standard for checking the temperature is with a rectal thermometer, especially for children under 1 year old.