Can’t fall asleep, or waking at 3 a.m.? Here’s how stress hormones, alcohol, caffeine, perimenopause, thyroid, iron, and sleep apnea disrupt sleep, and what to check first.
You went to bed on time. You skipped the late coffee. You put your phone down.
And you’re staring at the ceiling at 3 a.m. Again.
Maybe you even bought a sleep tracker, and now you have a graph telling you what you already knew: you slept badly.
If that’s you, I want to say this first: you’re not failing at sleep. Poor sleep almost always has a cause, and often more than one.
The tracker can tell you that it happened. It can’t tell you why.
This post covers the root causes I look at from a functional medicine and pharmacist perspective, what to ask your provider, and what actually helps. It’s educational and isn’t a substitute for care from your own healthcare team. Numbers in brackets point to the references at the end.
Spotting patterns, like how your sleep changes after alcohol or a late dinner. Consumer wearables are reasonably good at estimating when you’re asleep and awake.[1]
They’re much less reliable at telling you which sleep stages you were in.[1] (More on the metric on your watch you probably shouldn’t trust.)
There’s also a downside. Some people become so focused on their sleep scores that the tracking itself increases worry about sleep, which can make sleep worse. Researchers even have a name for it: orthosomnia.[2] If your numbers are stressing you out, it’s fine to take a break from them.
Either way, a score isn’t a fix. Let’s look at what’s behind the problem.
It’s common to find more than one. Here’s where I start.
Tired all day, wired at bedtime.
Your cortisol is supposed to be highest in the morning and lowest at night. When that rhythm is off, you can feel tired during the day and wired at bedtime.
It’s also a loop. After a night of short sleep, evening cortisol runs higher the next day,[3] which makes it harder to fall asleep the next night. If you’re exhausted by day and wired at night, this is the first pattern I look at. (See HPA axis dysfunction and being told it’s “just stress”.)
The most common causes, and the most fixable.
It may help you fall asleep, but as it wears off it fragments sleep in the second half of the night and suppresses REM sleep.[4] If you wake at 2 or 3 a.m., alcohol is a common culprit, even after a drink or two. (See how alcohol quietly undermines recovery.)
In one study, caffeine taken six hours before bed still cut total sleep by about an hour.[5] Many people are more sensitive than they realize, and sensitivity can change with age and hormones.
In a small study, eating more sugar and saturated fat and less fiber was linked to lighter, less restorative sleep.[6] I focus on protein, fiber, and vegetables at dinner, and finishing a few hours before bed.
Your body clock runs on it.
Evening light, including bright overhead lights and screens, suppresses melatonin and delays your body clock.[7] Dimming the lights and putting screens away about an hour before bed helps. Morning light matters just as much, because it anchors your rhythm for the whole day. More in how light runs your hormone clock.
This is where functional medicine thinking helps, especially for women.
Sleep gets harder for many women during perimenopause and menopause, with night sweats, 3 a.m. wake-ups, and lighter sleep becoming much more common.[8] Progesterone has a calming effect on the brain and often declines first, and in a small randomized trial it improved sleep in postmenopausal women.[9] That’s one reason sleep can fall apart before periods stop. I cover this in my post on perimenopause symptoms that get missed.
For men, low testosterone and poor sleep affect each other, and sleep apnea (below) is a common overlap. (See what happens to your hormones when you don’t sleep.)
An easy blood test, and one of the first I check.
Both an overactive and an underactive thyroid can disrupt sleep, along with fatigue, mood, and weight changes.[10] An overactive thyroid often causes trouble falling asleep, a racing heart, and anxiety. Already on thyroid medication and still struggling? See why thyroid medication works better for some people than others.
That urge to move your legs when you lie down.
An uncomfortable urge to move your legs at night, especially when you lie down, could be restless legs syndrome, which is linked to low iron stores. Guidelines recommend checking ferritin and treating low iron under a provider’s guidance.[11]
Ask for your actual ferritin number, not just “normal.” More on the hidden causes of anemia.
Unrefreshed no matter how long you’re in bed.
Sleep apnea causes repeated pauses in breathing at night, so you wake unrefreshed no matter how many hours you spend in bed.[12] It’s not only in men. Women more often describe insomnia, morning headaches, low mood, and fatigue rather than loud snoring, so it’s frequently missed.[13]
A simple screening questionnaire can tell you whether a sleep study is worth doing.
As a pharmacist, I always check this layer.
Some common medicines and products can interfere with sleep, including stimulant medications, decongestants, steroids, some antidepressants, and some supplements.
If your sleep changed around the time you started or changed something, tell your provider or pharmacist. Please don’t stop any medication on your own.
This isn’t a diagnosis, but it can help you notice a pattern:
| What You Notice | Possible Contributors to Ask About |
|---|---|
| Can’t fall asleep, wired at night | Stress rhythm, evening caffeine, bright light, thyroid |
| Waking at 2 to 4 a.m. | Alcohol, blood sugar swings, stress hormones, perimenopause |
| Waking hot or sweaty | Perimenopause, thyroid, medications |
| Restless legs or twitching | Low iron, medications |
| Snoring, gasping, morning headaches | Sleep apnea |
| Sleeping 8 hours but waking unrefreshed | Sleep apnea, thyroid, iron, B12, depression |
If you’re doing everything right and still waking up at 3 a.m., start with my free Sleep Solution. It walks you through the foundations of better sleep, so you know what to change first.
When someone says they can’t sleep, I look at the pattern:
When you fall asleep, when you wake, snoring, night sweats, and how you feel in the morning.
Thyroid with antibodies, ferritin with a complete blood count, B12, vitamin D, fasting glucose and insulin, A1c, and hormones when the story fits. Sometimes I also look at cortisol rhythm across the day.
A quick questionnaire, and a sleep study when it points that way.
Caffeine, alcohol, evening light, meal timing, and what you take.
Work, family, caregiving, and whether you ever get a real break.
I also use my four working patterns to organize what I find:
Wired at night, tired by day, 3 a.m. wake-ups, sleep that isn’t restful
Fatigue, restless legs, low iron or nutrients
Blood sugar swings, cravings, stubborn weight
Alcohol hitting harder, bloating, puffiness
These are clues that organize questions. They don’t diagnose a cause.
You don’t need a perfect routine. Start with a few of these:
If you and your provider decide magnesium is a fit, this is the one I use. Check first if you take medications or have kidney disease.
Products shown are available through my Fullscript dispensary. Farmacy Counter may earn a commission on purchases.
If you have trouble sleeping at least three nights a week for three months or longer, that’s chronic insomnia. The recommended first-line treatment is cognitive behavioral therapy for insomnia (CBT-I), and its benefits tend to last longer than sleep medications.[14] Ask your provider about finding it.
Please talk with your healthcare provider if you snore loudly or gasp at night, wake unrefreshed no matter how long you sleep, fall asleep during the day, or have persistent insomnia. And if poor sleep is weighing on your mood, bring that up too.
When you find the cause, whether it’s your stress rhythm, your hormones, your iron, or your thyroid, things often change.
If you haven’t yet, start with the free Sleep Solution above. And if you’d rather talk through what’s been going on, I offer a free discovery call. No pressure, just a conversation about whether functional medicine is the right next step for you.
Book Your Free Discovery Call →To your health and vitality, Dr. Ryan
Common contributors include alcohol wearing off, blood sugar swings, an off-rhythm stress response, and perimenopause. Sleep apnea and thyroid changes can also play a role, so it’s worth looking at the pattern with your provider.
Consumer wearables are reasonably good at estimating when you’re asleep and awake, but much less reliable at identifying sleep stages. They’re best for spotting patterns, not diagnosing problems.
In one study, caffeine taken six hours before bed still reduced total sleep by about an hour, so many people do better cutting off caffeine by early afternoon.
Yes. Sleep problems become much more common in perimenopause and menopause, including night sweats, 3 a.m. wake-ups, and lighter sleep, and they can start before periods stop.
Cognitive behavioral therapy for insomnia (CBT-I) is the recommended first-line treatment for chronic insomnia in adults, and its benefits tend to last longer than sleep medications.
For educational purposes only. Not a diagnosis, and not a substitute for care from your healthcare provider. Talk with your provider before starting, stopping, or changing any medication or supplement.