Feeling exhausted during the day but wide awake when you finally get into bed usually means your internal body clock has fallen out of sync with your actual schedule. This mismatch can happen gradually, driven by screen habits, stress, caffeine timing, or an underlying sleep disorder. The good news: once you identify what’s driving the disconnect, most causes are fixable without medication.
How Your Body Clock Works
Your brain has a master clock that takes its main cue from light entering your eyes. This cluster of cells sends signals throughout your body to coordinate when you feel alert and when you feel sleepy. When you’re exposed to morning sunlight, your brain triggers a rise in cortisol, the hormone that prepares your body to be active. As darkness falls, cortisol drops and your brain starts releasing melatonin, the hormone that makes you drowsy.
When this cycle is working properly, you feel naturally alert during daylight hours and progressively sleepier as the evening goes on. But artificial light and stimulants can send your brain false wakefulness cues, pushing the whole cycle later without you realizing it. Over weeks, the shift compounds: you can’t fall asleep until 2 a.m., you drag yourself awake at 7, and you spend the day running on fumes.
Screens Are Shifting Your Sleep Window
Blue-enriched light from phones, tablets, and laptops is especially effective at convincing your brain it’s still daytime. Current guidelines recommend keeping light exposure below 10 melanopic lux in the three hours before bed, but a standard phone or tablet screen at close range can exceed that dramatically. In controlled studies, just two hours of blue light exposure held melatonin levels at around 7.5 pg/mL, while participants under red light saw their melatonin climb to 26 pg/mL over the same period. By the third hour, blue light had suppressed melatonin to roughly a third of what it would otherwise be.
That suppression translates directly into lying in bed feeling alert. Your brain simply hasn’t received the chemical signal that it’s time to sleep. And because the effect is cumulative over a few hours, even “just checking your phone” at 10 p.m. can delay sleep onset enough to leave you groggy the next morning.
Caffeine Lasts Longer Than You Think
Caffeine has a half-life that ranges from 2 to 10 hours depending on your genetics, age, and liver function. That means a coffee at 3 p.m. could still have half its stimulant effect in your system at 9 or 10 p.m. for some people. Beyond just keeping you awake, caffeine reshuffles the architecture of your sleep. It pushes your deepest, most restorative sleep stages toward the end of the night and shortens total sleep time in a dose-dependent way. So even if you do fall asleep, you wake up feeling like you didn’t get enough rest, which feeds the cycle of daytime fatigue.
If you suspect caffeine is part of the problem, try cutting it off before noon for two weeks and see if your nighttime alertness changes. The wide variability in how fast people metabolize caffeine means the standard advice of “no coffee after 2 p.m.” may not be conservative enough for you.
Stress and Hyperarousal at Bedtime
Anxiety and stress create a physiological state that’s essentially the opposite of what your body needs to fall asleep. People with chronic insomnia show measurable increases in body temperature, heart rate, cortisol, and adrenaline levels at bedtime. This hyperarousal state doesn’t just make it hard to fall asleep. It also causes daytime fatigue and low mood, even when total sleep hours seem adequate on paper. Your nervous system is stuck in a “wired but tired” loop: too activated to sleep at night, too depleted to function during the day.
Elevated nighttime cortisol is particularly disruptive because it actively suppresses melatonin. When cortisol peaks at the wrong time, your body delays sleep onset and increases the number of times you wake during the night. This is one reason people under chronic stress often describe feeling simultaneously exhausted and unable to sleep.
Delayed Sleep Phase Disorder
Some people aren’t just staying up too late by choice. Delayed sleep phase disorder is the most common circadian rhythm sleep disorder, and its hallmark is an internal clock that’s shifted significantly later than the typical day-night cycle. If you naturally fall asleep around 2 to 4 a.m. and, left to your own schedule, would sleep until 10 a.m. or noon with perfectly normal sleep quality, this pattern fits.
The key distinction is that when people with this condition are free to sleep on their own schedule (weekends, vacations), their sleep is completely normal in duration and quality. It’s just delayed. The problems come from trying to conform to a conventional schedule, which leads to chronic sleep restriction during the week and long catch-up sleep on free days. This condition has a strong genetic component and often begins in adolescence. It’s not laziness or poor discipline, and it typically doesn’t respond well to willpower alone.
Sleep Apnea Can Mimic This Pattern
Obstructive sleep apnea causes repeated breathing interruptions during sleep, and many people who have it don’t know. The nighttime symptoms include loud snoring (often interrupted by silent pauses), gasping or choking awake, and frequent trips to the bathroom. During the day, it shows up as excessive sleepiness, morning headaches, dry mouth on waking, and difficulty concentrating.
What makes sleep apnea relevant here is that it destroys sleep quality without necessarily making it obvious. You may feel like you slept for seven or eight hours, but your brain was jolted out of deep sleep dozens of times. The resulting daytime exhaustion can make you rely on caffeine and naps, which then push your nighttime sleep later, creating the same tired-by-day, wired-by-night pattern. If you snore, wake with headaches, or a partner has noticed pauses in your breathing, this is worth investigating.
How to Reset Your Sleep Timing
The single most effective tool for pulling your body clock earlier is morning light exposure. Getting outside before 10 a.m. gives your brain the strong light signal it needs to anchor your circadian rhythm to the solar cycle. Overcast daylight still delivers far more lux than indoor lighting, so this works even on cloudy days. Aim for a consistent wake time seven days a week, even if you slept poorly. Varying your wake time by more than an hour on weekends keeps your clock drifting.
In the evening, reduce light exposure in the three hours before you want to sleep. Dim overhead lights, switch devices to warm-toned night modes, or stop using screens altogether in that window. A relaxing pre-sleep routine, whether that’s a warm bath, stretching, reading a physical book, or meditation, helps signal your nervous system to wind down. Avoid stimulating activities close to bedtime, including intense TV, work emails, or stressful conversations.
Keep your bedroom cool, dark, and reserved for sleep. Temperature matters more than people realize: being too warm suppresses the natural drop in core body temperature your body needs to initiate sleep. If you’ve been lying awake for what feels like 20 to 30 minutes, get up and do something quiet in dim light until you feel genuinely drowsy, then return to bed. Forcing sleep tends to amplify the hyperarousal that’s keeping you awake.
The Role of Magnesium
Magnesium supports sleep through two complementary pathways in the brain. It boosts the activity of GABA, the neurotransmitter responsible for calming neural activity, while also dialing down excitatory signaling. This dual action helps reduce the kind of racing, restless brain activity that keeps you staring at the ceiling. Magnesium has a particularly notable effect on slow-wave sleep, the deep sleep phase your body depends on for physical repair and memory consolidation.
Many people don’t get enough magnesium through diet alone, and even a mild shortfall can contribute to difficulty falling and staying asleep. Foods rich in magnesium include dark leafy greens, nuts, seeds, and legumes. Supplemental forms like magnesium glycinate are commonly used for sleep support, though results vary from person to person.
Putting It Together
For most people searching this question, the cause isn’t a single factor but a reinforcing loop. Late-night screen use suppresses melatonin, which delays sleep onset. Shortened sleep increases daytime fatigue, which drives afternoon caffeine, which further delays sleep. Stress about not sleeping raises nighttime cortisol, which suppresses melatonin even more. Each piece feeds the next.
Breaking the loop usually means addressing multiple factors at once: anchoring your wake time with morning light, cutting caffeine earlier, reducing evening light exposure, and managing the stress or anxiety that’s keeping your nervous system revved at night. If these changes don’t improve things within three to four weeks, or if you recognize the symptoms of sleep apnea or delayed sleep phase disorder, a sleep specialist can run targeted evaluations to identify what’s happening and tailor treatment to your specific pattern.

