On clear and calm nights, the ground radiates its absorbed heat back into the atmosphere, allowing temperatures to cool at night. But since cold air is heavier that warm air, the cold air will pool right near the ground.
In this case, in the moments before sunrise, it might be 40 degrees at your head but 36 degrees at your toes. When the sun comes up, the ground starts warming.
As that warm air rises, will begin to mix the colder air near the surface with the warmer air above -- thus making it warmer at your foot but cooler at your head (perhaps now it's 38 at both your head and your foot).
That would only happen on nights without much wind and generally clear skies. Otherwise, wind will keep that layer mixed up and cloudy skies don't allow much heat to radiate back.