Your body can't initiate sleep until your core temperature drops. It accomplishes this by sending warm blood to your extremities, specifically your hands and feet.
Warm feet signal vasodilation (blood vessels opening up). This allows heat to escape from your core, triggering the temperature drop your body needs to start the sleep process.
Cold feet do the opposite. They signal vasoconstriction (blood vessels constricting), which keeps heat trapped in your core and prevents the temperature shift from happening.
The result? You lie there, exhausted but unable to fall asleep - because your body literally can't trigger sleep onset without that core temperature drop.
This isn't folk wisdom. A landmark 1999 study published in Nature found that warm feet are the strongest predictor of fast sleep onset. For every degree your foot temperature rises, you fall asleep faster.