Story
Insomnia
Last updated
In one pass Insomnia needs two things together: nights that go badly, and days that sag with them — tiredness, scattered attention, low mood.
Educational content, not medical advice — consult a clinician.
Story path
Chapter 1
What insomnia is and why it happens
Not being able to sleep is usually not about the body lacking something; it is that the force that presses you down into sleep has not arrived. That force is really three, each doing its own job:
Adenosine: a metabolic leftover from the brain's energy use, which piles up the longer you are awake; only when enough has piled up do you feel sleepyThe body clock: only once it is dark does it send the signal that "you may sleep now"The stress axis: it should be on by day and switched off before bed
Whichever force fails, insomnia takes that shape. The caffeine in an evening coffee gets to the spots where adenosine should dock, so the pressure keeps building but you cannot read it, and you lie awake. Staring at a bright screen late at night means the clock never hears that it is dark, and sleepiness shifts later as a whole. A stress axis that will not switch off pushes you awake early in the second half of the night, and you cannot get back to sleep. All three failing together is the classic picture of chronic insomnia — and the reason "just lying there a bit longer" almost always makes it worse.
If insomnia comes with persistent low mood and thoughts of harming yourself, this is no longer only a sleep problem: contact a mental-health service or go to the emergency department immediately.
Mechanism · Three forces behind sleep and how they fail
Sleep is not simply switching the power off; it is a series of neurochemical events the brain actively carries out.① Sleep is driven by three forces, each with its own physical action
Adenosine pressure (the homeostatic drive): all day, brain cells spend adenosine triphosphate (), the cell's energy currency, and one of the leftovers is adenosine. With every waking hour it builds up in the gaps between cells and docks on adenosine receptors (A1) on the surface of the nerve cells whose job is to keep you awake — as if someone were turning their volume down one notch at a time. The sleepiness you feel is that build-up being read out. Sleep (especially deep sleep) clears it, so the pressure is back down when you wake, and a new day starts piling it up again.
The caffeine molecule looks like adenosine, enough to sit in the same receptor pocket, but once there it does nothing. So adenosine keeps piling up while your wake-promoting nerve cells cannot read it — caffeine does not give you energy; it covers up the dashboard. One common explanation is that once the liver has broken the caffeine down and it slips off the receptors, the adenosine that was kept outside connects all at once, which is the sudden slump a few hours after a coffee; the explanation makes sense but has not been measured directly. How caffeine blocks this step is covered in the chapter How caffeine blocks sleepiness in the Caffeine + L-Theanine story.
The body clock (the circadian drive): besides the rods and cones that let the eye see images, the retina holds a small group of light sensors that only measure brightness — intrinsically photosensitive retinal ganglion cells (ipRGCs) — which are most sensitive to blue light. They play no part in forming images; they send just one piece of information, how bright it is outside, along a dedicated nerve to the suprachiasmatic nucleus () in the hypothalamus, the master clock for the whole body. Only when the SCN confirms it is dark does it release its brake on the pineal gland, and melatonin secretion begins. So melatonin is not a sleeping pill; it is an announcement that night has fallen: it declares that night starts now, so the whole body can set its rhythms to that moment — it does not knock you out.
The other half of this clock's work is often overlooked: in the evening it pushes hard toward wakefulness. Adenosine pressure has been rising all day, and if the clock does not let go at the same moment, you end up in that state of tired but unable to sleep — not because the pressure is too low, but because the other force has not stood down. A bright screen at night keeps exactly that hand pressed down: the light tells the SCN "it is still daytime", the start of melatonin is pushed later as a whole, and your sleepiness moves later with it.
The stress axis (the hypothalamic-pituitary-adrenal axis, axis): the normal cortisol curve falls to its lowest around the time you fall asleep and starts to rise before dawn, and that rise is what is meant to wake you naturally. Chronic stress bends both ends of the curve at once. In the evening the trough never gets deep enough, heart rate and body temperature do not come down, and so you are lying down but your brain is still in a meeting; in the second half of the night the rise comes too early and too steeply and pushes you out of light sleep — a common source of waking in the small hours and never getting back to sleep. It can also bite its own tail: wake up, think "that's it, tomorrow is ruined", and the stress axis fires again on the spot and takes the rest of the night too.
A problem with any one of the three forces can cause insomnia:
Awake for 16 hours, but a coffee late in the day: the adenosine signal is blocked, and falling asleep is hardStill looking at a bright screen at 22:00: the SCN never gets the "time to sleep" signalHigh work stress and a stress axis that will not switch off: awake at 3 amAll three forces failing at once: the typical picture of chronic insomnia
② Sleep stages (a full night of 7–8 hours contains about 4–5 cycles of roughly 90 minutes each):
Non-rapid eye movement sleep, stage 1 (NREM 1): the transition into sleep, a few minutesNREM stage 2: the bulk of sleep, about 45–55%NREM stage 3 (slow-wave sleep, or deep sleep): linked to physical recovery, immunity and memory consolidation; more of it in the first half of the nightRapid eye movement sleep (): when most dreaming happens, linked to processing emotion and consolidating procedural learning (such as a movement skill); more of it in the second half of the night
What this means for different kinds of insomnia: waking too early mainly cuts off REM from the second half of the night; trouble falling asleep delays when deep sleep appears in the first half; repeated brief awakenings fragment both. But human studies have not matched each missing stage to a particular daytime problem in this one-to-one way — and deep sleep can partly make up for itself: if one night is short on it, the next night often recovers some. So don't treat this as a diagnostic chart.
③ A few things worth knowing:
Sleeping until noon at the weekend to catch up: partly works, but cannot fully make up the loss, and it scrambles the SCN, making Monday harder (social jet lag)The measurable effects of short sleep: the widely quoted line that reaction speed matches a blood alcohol concentration of 0.05% comes from an experiment that kept people awake for 17 hours straight — it measures time awake, not "I only got 6 hours last night", and the two don't convert into each other. The "drink-driving level" comparison also travels badly: China's drink-driving threshold is 20 mg/100 mL (0.02%), a different line from the figure in that experiment. What is solid: reaction speed and attention genuinely drop, and long-term short sleep is also linked to higher risks of cardiovascular disease, type 2 diabetes, Alzheimer's disease and depression (observed associations)Memory consolidation happens in deep sleep and REM: sleeping well after studying works better than staying up to reviewDeep sleep declines slowly from young adulthood and is clearly lower after age 40 — which is why lighter sleep is more common in older people; this is a normal change, and it does not mean giving up on recovery
Why can I lie in bed for an hour and not sleep, yet nod off on the sofa in seconds? This has a name: conditioned insomnia (psychophysiological insomnia). After many nights of lying awake in bed, the body files the bed itself as a place of anxiety, and getting into bed starts to trigger wakefulness. Cognitive behavioral therapy for insomnia () has a component called stimulus control that deals with exactly this: go to bed only when sleepy, get up if you cannot sleep, and use the bed only for sleep and sex.
So "just lying there a bit longer" almost always makes things worse, and by two roads at once.
One is the conditioning above: the more hours you spend awake in bed, the better practiced the link "bed means awake" becomes. The other is adenosine: lying in, napping in the afternoon, sleeping until noon at the weekend — each of these lets out some of the sleep pressure that day has built, so you are less sleepy at night; less sleepy, you go to bed even earlier and lie awake even longer — and the loop tightens.
The most counterintuitive part of CBT-I, sleep restriction, uses both roads in reverse: it compresses time in bed to about the time you actually sleep, so adenosine builds up fully again, and the act of getting into bed is paired once more with only one thing — falling asleep quickly.
Clinical · Is this insomnia?
By duration:Acute insomnia: under 3 months, usually with a trigger (stress, jet lag, illness)Chronic insomnia: at least 3 nights a week for at least 3 months, with daytime impairment — the diagnostic criteria of the International Classification of Sleep Disorders, third edition (ICSD-3)A commonly quoted estimate: 30–35% of adults have occasional insomnia, and 10–15% have chronic insomnia
By pattern:
Trouble falling asleep: still awake more than 30 minutes after getting into bedTrouble staying asleep: waking in the night and taking more than 30 minutes to get back to sleepEarly waking: waking 1 hour or more before you mean to get up, and unable to get back to sleepNon-restorative sleep: still tired after 7–8 hours
The types are not a label to stick on yourself; they tell you which force to adjust. Trouble falling asleep usually points to adenosine pressure that never built up (caffeine blocking it, or a daytime nap that spent it) or a stress axis that has not switched off. Trouble staying asleep and early waking more often mean the stress axis's rise in the second half of the night came too early. Non-restorative sleep first raises the question of how much deep sleep you actually got, and whether repeated micro-awakenings chopped sleep up — the latter is often not insomnia at all but something else, such as sleep apnea.
I sleep 6 hours a night — is that insomnia? Not necessarily; how much sleep people need varies quite a lot:
Most adults need 7–9 hours, but a few do fine on 5–6 hours (true short sleepers, less than 5% of people)The test: is there daytime impairment (attention, reaction time, mood, error rate)?No impairment and you are satisfied: 6 hours may be enough; impairment: you need more
Insomnia is one of the problems most often handled the wrong way. Many people go straight to melatonin or an over-the-counter (OTC) sleep aid, but:
Z-drugs (the zolpidem family) and benzodiazepines, the true sleeping pills, carry risks of falls and dependence with long-term use; the association observed with dementia belongs mainly to benzodiazepines, not Z-drugsMelatonin is not a sleeping pill; it is a signal to the body clock, and the wrong dose or timing can backfireCognitive behavioral therapy for insomnia () is the first-line treatment every major guideline agrees on, supported by of multiple — but it is little used, and many people have never heard of it
What this story sets out to do is move the conversation about insomnia from what to take to why you cannot sleep, and which levers actually work.
Chapter 2
CBT-I, the first-line treatment
Sleeping pills cover the surface — "I can't sleep tonight". CBT-I takes apart why this insomnia will not stop: the habits that grew up as rescue moves — going to bed early, lying in, napping by day, lying awake counting how many hours are left. Each one weakens the forces that press you down into sleep, and the insomnia starts to feed itself.
So its two strongest components are actions, not reassurance:
Stimulus control: make the bed pair again only with falling asleep quicklySleep restriction: tighten time in bed so that sleep pressure builds high enough again
Every major guideline makes it the first-line treatment: the American Academy of Sleep Medicine (AASM) 2021 guideline gives multicomponent CBT-I a strong recommendation, backed by of multiple . It has none of the side effects that drugs have; its main cost is extra sleepiness in the first week or two of sleep restriction. Where it truly pulls away from sleeping pills is after you stop: stop a drug and the problem tends to rebound, while what CBT-I changed stays with you.
In practice · The five parts of CBT-I and where to get it
Start with which two of these five components are actually moving a mechanism.Stimulus control undoes a learned reflex. Sleep pressure comes from a metabolic leftover called adenosine: the longer you are awake, the more it piles up, only when enough has piled up do you feel sleepy, and sleep clears it. The problem is that after many nights of lying in bed awake, the brain dutifully ties the act of getting into bed to becoming alert — until just walking into the bedroom and turning back the covers sends the heart rate up. This is not something you thought up; it was trained. So it can only be trained back: get into bed only when genuinely sleepy; if you have lain there a while without falling asleep, leave the bed and do something quiet; let the place called bed pair again with only one event — falling asleep quickly. It works slowly, because undoing a reflex practiced for years takes many repetitions.
Sleep restriction works on adenosine itself. The most natural rescue moves of someone who sleeps badly — going to bed earlier, lingering in the morning, napping in the afternoon — each let out some of that day's sleep pressure early, so you are less sleepy at night; less sleepy, you go to bed even earlier and lie awake even longer, and the loop tightens. Sleep restriction does the reverse: it compresses time in bed toward the hours you actually sleep, with no catching up by day, so by evening adenosine is high enough that you drop off; once sleep efficiency rises, time in bed is given back week by week. Feeling more tired in the short run is part of the design — that tiredness is the evidence that pressure is being built up again. It is also why a therapist should supervise it: squeeze too hard, and the risk when driving or operating machinery by day is real.
Cognitive behavioral therapy for insomnia () is the recognized first-line treatment for chronic insomnia:
Every major guideline agrees (AASM 2021, the UK's NICE, the American College of Physicians, ACP)Evidence: multiple , and the that pool themHow big the effect is (Trauer 2015, a meta-analysis in *Annals of Internal Medicine*, compared with control groups): the time taken to fall asleep shortened by about 19 minutes, total time awake after first falling asleep (wake after sleep onset, WASO) fell by about 26 minutes, and sleep efficiency (the share of time in bed spent asleep) rose by about 10 percentage points; total sleep time went up by only 7.6 minutes, and its crosses 0Long-term effect: still holding at 6 months — fundamentally different from sleeping pills, where problems tend to rebound once you stopSide effects: none of the side effects drugs have; the first week or two of sleep restriction brings extra sleepiness
The 5 components of CBT-I:
① Sleep hygiene
Fixed wake and bed timesLimit caffeine (at least 6 hours before bed; with insomnia, finishing it before noon is safer)Drink less alcoholCut blue light and bright screens in the hour before bedKeep the bedroom cool, dark and quietNo work or phone in bed
② Stimulus control (the core component):
Get into bed only when you are sleepyIf you are not asleep within 20 minutes, get up and go to another room and do something quiet (read, fold laundry)Go back to bed when sleepyUse the bed only for sleep and sexThe aim is to rebuild the conditioned link "bed is where I sleep"
③ Sleep restriction (counterintuitive, but the most effective):
Estimate how long you actually sleep (say, 5 hours)Limit time in bed to that figure plus 30 minutes (say, 5.5 hours)Don't linger in bed when you can't sleepOnce sleep efficiency is at least 85% for 1 week, add 15 minutes a weekYou may feel more tired in the short term, but it is rebuilding your drive to sleepTherapist-supervised; not recommended as a do-it-yourself step
④ Cognitive restructuring
Replace "if I can't sleep again tonight, tomorrow is ruined" with "I might be tired, but I can get through it"Replace "normal people need 8 hours" with "my own need may be 7 hours"Replace "insomnia this week means it will only get worse" with "acute insomnia mostly settles on its own"
⑤ Relaxation training
Progressive muscle relaxation, belly breathing, mindfulnessDone in the 20–30 minutes before going to sleep
Where to find CBT-I:
In person, 6–8 sessions: clinical psychology services, sleep medicine centersDigital CBT-I apps:Sleepio (recommended in the UK's NHS), Somryst (an FDA-authorized prescription digital therapy in the US), CBT-I Coach (a free app from the US Department of Veterans Affairs), Stellar, Sleep School and othersMost are 6-week self-guided programsRandomized controlled trials support them, with effects close to in-person therapyBooks: *Quiet Your Mind and Get to Sleep* (Carney and Manber)
Why isn't CBT-I everywhere?
It doesn't sell like a pill — the industry's incentives point the wrong wayDoctors receive little training in itPatients want something fast, and CBT-I takes 6–8 weeksThe result: most people who receive an insomnia diagnosis are never referred for CBT-I at all (we have no reliable source for a precise share, so no number is given here)
How drugs and CBT-I compare — read the next lines as the guideline-level picture, and not as a result of Trauer 2015: that meta-analysis compared CBT-I with a waiting list, sleep hygiene alone or placebo, with no head-to-head comparison against drugs, so it cannot support a tier-by-tier table.
Short term (under 4 weeks): broadly similarLong term: CBT-I holds; drugs don't — tolerance, rebound and side effects build up. That is exactly why every major guideline puts CBT-I firstAfter CBT-I, a substantial share of people no longer need medication (again, there is no reliable source for a specific percentage, so none is given)
Evidence · What the meta-analysis and the guideline say
Trauer 2015, a (*Annals of Internal Medicine*), the most widely cited summary for :20 , 1162 adults with chronic insomnia in totalIt compared in-person CBT-I (4–9 sessions) with control groups (waiting list, sleep hygiene only, or placebo)Results at the end of treatment:Time taken to fall asleep: 19.0 minutes shorterWake after sleep onset (WASO), the total time awake after first falling asleep: 26 minutes lessTotal sleep time: 7.6 minutes more, 95% (CI) −0.5 to 15.7 — the interval crosses 0, so the result is not statistically significant. That fits: the sleep restriction phase deliberately tightens time in bed, so what CBT-I buys is sounder sleep in the same window, not more sleepSleep efficiency: up by about 10%The effects still held at later follow-up points
Edinger 2021: the American Academy of Sleep Medicine (AASM) clinical practice guideline (*Journal of Clinical Sleep Medicine*):
STRONG recommendation — there is only one in the whole guideline:Multicomponent CBT-I (in person or remote) for adults with chronic insomniaCONDITIONAL recommendations (the guideline's wording is "we suggest"):Brief behavioral treatment for insomnia (BBT-I, 2–4 sessions)Stimulus control on its ownSleep restriction on its ownRelaxation trainingRecommended against — the guideline's only negative recommendation, also conditional in strength: sleep hygiene used as a single-component therapyOne more thing worth stating: digital CBT-I is not a standalone recommendation item in this guideline. It sits inside the evidence base for multicomponent CBT-I and cannot be labeled a strong recommendation on its own
Key point: CBT-I is a multicomponent program, and any single component on its own falls short of the full package
Is CBT-I right for everyone?
Not appropriate for (these mainly concern the sleep restriction component): acute insomnia (short-lived, usually settles on its own); severe untreated depression (treat the depression first); uncontrolled bipolar disorder (sleep restriction can trigger mania); sleep apnea (needs a breathing machine, , not CBT-I); epilepsy or a history of seizures — sleep deprivation is a well-established factor that lowers the seizure threshold; parasomnias (sleepwalking, night terrors and the like) — sleep deprivation worsens episodes; and anyone who drives or operates machinery every day: in the first week or two of tightening time in bed, daytime sleepiness rises, the risk in that stretch is real, and a therapist must plan itAppropriate for: chronic (at least 3 months) primary insomnia, and most insomnia that comes with other conditionsCBT-I alongside treatment of other conditions: when insomnia coexists with depression, anxiety, chronic pain, gastroesophageal reflux () and the like, CBT-I still works, and it works together with treatment of those conditions
Practical recommendations:
1. See your family doctor or GP first: rule out an underactive thyroid, anemia, sleep apnea and depression
2. Find CBT-I resources:
In the US: search psychologytoday.com for a clinical psychologist who offers CBT-IIn China: sleep medicine centers and psychology departments at tier-3 hospitalsDigital apps: Sleepio, Somryst, CBT-I Coach3. Adjust your lifestyle at the same time: a caffeine cutoff, less blue light, a fixed wake time
4. Complete the program over 6–8 weeks
5. If it does not work: get referred to a sleep medicine specialist to look for other causes
Chapter 3
What sleep nutrients each do
Magnesium: acts on muscle and synapse. It is a required partner for the calcium pump that moves calcium back into storage, which is what lets a muscle truly relax; it also sits like a plug in the mouth of the NMDA receptor, an excitatory channel, raising the threshold at which a nerve cell firesGlycine: acts on body temperature. It opens the blood vessels in the hands and feet so heat escapes from the trunk and core temperature falls — and a falling body temperature is itself one of the triggers for sleep (this mechanism comes mainly from animal studies)L-theanine: acts on anxiety. It is thought to tune , the brain's main braking (inhibitory) signal, loosening the kind of trouble falling asleep where your eyes are shut but your mind will not stopMelatonin: acts on the clock, not on sleepiness. It is a "night has fallen" bulletin: it sets when sleepiness starts, not how deep it goes
So: for waking in the night or waking too early, ordinary (immediate-release) melatonin does little (it governs the start, not staying asleep); theanine is the one for anxiety-driven trouble falling asleep; glycine is worth trying if your hands and feet are cold and your sleep is light.
In practice · Dose, timing and who each tool suits
Why is melatonin so counterintuitive to use?It does not put you to sleep; it tells the whole body that night starts now. The pineal gland begins secreting it only after dark; the level in the blood climbs slowly and docks on MT1 and MT2 receptors on cells in the master clock, the suprachiasmatic nucleus (), and in the preoptic area of the hypothalamus. The MT1 route is thought mainly to turn down the drive that keeps you awake; the MT2 route mainly slides the whole clock earlier or later.
So its effect depends mainly on when you take it, not how much. Take it a few hours before your body would start secreting its own, and the clock is pulled earlier, so you start feeling sleepy earlier. Swallow it only once you are in bed, when your own melatonin is already flowing, and the clock-shifting effect is much smaller. Take it in the early morning or during the morning, and it may even push the clock later — this is melatonin's phase response curve: the same dose can shift the clock in opposite directions depending on when it is taken. The dose puzzle follows the same logic: the receptors are already fully occupied at a very low concentration, so more does not make the announcement louder; it only leaves melatonin in the blood after dawn, which is that dragging, dull feeling the next morning.
How to use the four tools (from most evidence to least):
① Magnesium
Evidence: a few small randomized trials with inconsistent results (certainty of evidence: low)Mechanism: partners the SERCA calcium pump (the pump that moves calcium back into the muscle cell's internal store) to help muscles relax; acts as a plug in the NMDA receptor; may modulate gamma-aminobutyric acid (), the brain's main inhibitory signal (the chapter Muscles need it to relax in the Magnesium story)Dose: 200–400 mg of elemental magnesium before bed; the part of that range above the tolerable upper intake level () for supplemental magnesium should be taken under medical guidanceForm: magnesium glycinate, threonate and citrate are absorbed better than magnesium oxide (which is poorly absorbed); threonate is often marketed as crossing the blood-brain barrier, a claim that comes mainly from rat experimentsWhat to expect: time to fall asleep may shorten by 10–15 minutes (randomized trials are inconsistent); you may feel more relaxedSide effects: diarrhea at high doses (which is itself how the body gets rid of extra magnesium); the glycinate form is gentleWho may benefit most: people with known magnesium deficiency, frequent cramps or a tendency to anxiety
② Glycine
Evidence: mainly one small trial (Yamadera 2007) in which participants rated their sleep quality as better (certainty of evidence: low)Mechanism: regulates body temperature (a drop in body temperature is one of the triggers for sleep; this mechanism comes mainly from animal studies), and may also affect GABA signaling (the chapter Five jobs for one amino acid in the Glycine story)Dose: 3 g taken 30–60 minutes before bedWhat to expect: some improvement in falling asleep and in how well you feel you sleptSide effects: very rareWho may benefit most: people who sleep lightly and wake unrefreshed
③ L-theanine
Evidence: a few small randomized trials, looking mainly at feeling relaxed and at stress (certainty of evidence: low)Mechanism: may modulate GABA, increase alpha brain waves and ease anxiety (the chapter Theanine, the amino acid in tea in the Caffeine + L-Theanine story)Dose: 200–400 mg before bedWhat to expect: feeling more relaxed; trouble falling asleep that is driven mainly by anxiety may improveSide effects: almost none reportedWho may benefit most: people whose trouble falling asleep is anxiety-driven
④ Melatonin (useful only in specific situations)
Evidence: strongest for rhythm problems such as jet lag, shift work and delayed sleep phase (certainty of evidence: moderate); for ordinary chronic insomnia the effect is smallMechanism: see the section aboveGenuine indications:Trouble falling asleep (delayed sleep onset): 0.3–0.5 mg, 30–60 minutes before bed (not at lights-out)Jet lag: 0.5–3 mg after arrival, taken close to local bedtime (about 22:00–24:00) for 3–5 days — do not move it earlier to the late afternoon or evening: the Cochrane states plainly that taking it too early causes daytime sleepiness and slows adjustmentShift work and delayed sleep phase syndrome: 0.3–0.5 mg, taken 4–6 hours before the time you want to fall asleep (to move the clock earlier)Non-24-hour rhythm in people who are totally blind: prescription dosingNot suited to:Trouble staying asleep and early waking: ordinary (immediate-release) melatonin has a short half-life and does not help; prolonged-release prescription forms are a different matter — ask a doctorChronic primary insomnia: is far more effective than melatoninCommon mistakes:Taking 5–10 mg: the receptors are already full, and you are more likely to feel groggy the next dayGiving children sugary melatonin gummiesTaking it only when you get into bed (too late)
Safety · Sleep aids that don't work or need care
No use, or use with care:5-hydroxytryptophan (): taken with antidepressants or monoamine oxidase inhibitors (), it can trigger serotonin syndrome (an acute toxic reaction to too much serotonin); safety data are limitedValerian: most randomized trials were negative; there are rare reports of liver injuryKava: there are reports of liver toxicity, and it has been banned or restricted in several countriesChamomile tea: may soothe mild anxiety a little, but it does not treat insomnia; it works more as a bedtime ritual, with the ritual counting for more than any direct drug effectLemon balm: similar to chamomile — more ritual than pharmacologyCannabidiol (CBD): the evidence is mixed; some people respond, but product quality varies widely; the only approved CBD prescription drug (Epidiolex) treats epilepsy, not sleepAshwagandha: may help with chronic stress and anxiety-driven insomnia, but there are case reports of drug-induced liver injury (), so it is not suited to long, uninterrupted use
In practice:
First line: lifestyle change plus If you want to add supplements: magnesium 300 mg plus glycine 3 g before bed has few side effects and costs little, which makes it a reasonable starting point — but the evidence for both is weakL-theanine 200 mg: can be added when anxiety is prominentMelatonin: only within its indications, at a low doseDon't expect supplements to cure insomnia: even when they help, it is a small improvement in how you feel; figures you see online such as "improves sleep by 10–20%" have no reliable trial behind them
Chapter 4
Long-term risks of sleeping pills
Pressing the brake: strengthening , the brain's main inhibitory (braking) signal, to push the whole brain's activity down. Z-drugs (zolpidem and its relatives) and benzodiazepines take this road — what they produce is sedation, which is not quite the same thing as natural sleepEasing off the accelerator: blocking a signal that keeps you awake, so sleepiness can arrive on its own. The newer orexin receptor antagonists block orexin; old-style over-the-counter antihistamine sleep aids block histamine — a crude version of this road that also blocks other receptors along the way
The brake road has an unavoidable cost: as long as the outside suppression is there, the body loosens its own brake to offset it. So the same dose works less and less (tolerance), and once you stop, your brake is weaker than before you started — the rebound nights are often harder than the original problem. That is why short-term use and long-term use are two completely different things, and why coming off must go step by step rather than all at once.
There is also a separate red line: people who snore with pauses in their breathing should not use sedating sleeping pills, which make it even harder for an already collapsing airway to wake them.
Safety · Five classes of sleep drugs, five red lines
Over-the-counter and prescription sleeping pills fall into five classes, each with its own indications and red line. First, remember one sentence per class: what it does, and where its red line is.① Z-drugs (zopiclone, eszopiclone, zolpidem; Ambien is a US brand name of zolpidem): commonly prescribed sleep aids that really can knock you out in the short run. The red line is short-term use only (< 4 weeks) — tolerance, dependence, rebound if stopped abruptly, and the US FDA boxed warning for complex sleep behaviors (sleepwalking, sleep-eating, sleep-driving). Two facts need to be kept apart: the boxed warning has only that one subject (plus a contraindication in anyone who has already had such an episode); falls and dementia are not in the box — they come from observational studies, and the dementia signal belongs mainly to benzodiazepines, not Z-drugs. Older people and anyone with existing cognitive impairment should especially avoid them (Z-drugs are on the American Geriatrics Society's AGS Beers list).
② Benzodiazepines (diazepam, alprazolam, lorazepam, temazepam): an older class of strong sedatives that also treat anxiety. The red line is a high risk of dependence — dependence can set in within weeks, withdrawal can trigger seizures, and there are risks of falls and suppressed breathing (more dangerous with alcohol or opioids). The evidence for the dementia association also sits with this class: in a case-control study, risk rose from 3 months or more of cumulative use (Billioti de Gage 2014, *BMJ*). Not a first choice for insomnia; if used at all, only briefly in an acute phase (≤ 2 weeks), followed by a stepped taper.
③ Antihistamines (doxylamine, diphenhydramine; Benadryl is a brand name of diphenhydramine): the ingredient in many over-the-counter sleep aids (in the US, Unisom, NyQuil and others); they work by making you drowsy. The red line is not for chronic insomnia — a pile of anticholinergic side effects (dry mouth, constipation, blurred vision, urinary retention), tolerance that arrives quickly, and the more you use cumulatively, the stronger the association with later dementia (Gray 2015, *JAMA Intern Med*: a prospective cohort of 3,434 adults aged 65 and over, followed for a median of 7.3 years; first-generation antihistamines such as diphenhydramine were among the most commonly used strong anticholinergics in that cohort).
④ Sedating antidepressants (trazodone, doxepin, mirtazapine): these are not one class — only doxepin is a tricyclic; trazodone is a serotonin antagonist and reuptake inhibitor (SARI), and mirtazapine is a noradrenergic and specific serotonergic antidepressant (NaSSA). They are used at low doses for sleep (trazodone for sleep is off-label). They do not act especially fast, but they are a reasonable choice when insomnia comes with depression; watch for effects on heart rhythm, weight and sexual function.
⑤ Orexin receptor antagonists (suvorexant, lemborexant, daridorexant): the newest class, which works by switching off a wake signal (orexin) so sleepiness can arrive naturally. Low risk of dependence and little effect on thinking make them a better fit for chronic insomnia; the downsides are cost (insurance approval is often needed), occasional next-day drowsiness, and, in very few people, sleep paralysis.
Clinical · How the drugs work, and how to taper
How the five classes work, and the key dataFirst, get the site of action clear. is the brain's main inhibitory transmitter — when it docks on a GABA-A receptor it pulls open a chloride channel, negative charge floods into the nerve cell, and the cell becomes harder to fire. Benzodiazepines and Z-drugs do not open this channel themselves; they sit at a regulatory site beside it and make each docking of GABA more effective (pharmacologists call this positive allosteric modulation) — the equivalent of making the brake pedal more sensitive. The difference is that Z-drugs prefer receptors that contain the α1 subunit — the type that mainly drives sedation — so their side effects on anxiety, seizures and muscle relaxation are relatively lighter; but the fact that sedation is not sleep does not change.
Tolerance and rebound are two ends of the same thing. When the brake is strengthened from outside, continuously, the nerve cell turns down the number and sensitivity of its own receptors to keep its original balance of excitation — that is tolerance. Stop the drug suddenly and the outside force is gone while the receptors are still in their loosened state, so the net effect is a brake weaker than before you started: worse sleep, more anxiety — and that doubled misery is very easily read as "so I can't do without it". So coming off has to be slow enough for the receptors to reset.
Why antihistamines make you sleepy. Histamine is not just the molecule behind allergies; it is also one of the "stay awake" signals sent out by the hypothalamus. First-generation antihistamines get into the brain and block H1 receptors, cutting off this wake signal — the drowsiness is a side effect, not what the drug was designed for. The same drugs also block acetylcholine receptors along the way, which is where the dry mouth, constipation, blurred vision and urinary retention come from.
Why the orexin route is different. Orexin is a "don't shut down" command sent by a small group of neurons in the hypothalamus; it keeps wake systems such as histamine and noradrenaline propped in the on position. Blocking it does not press another layer of sedation onto the brain; it lowers the hand that has been propping things up, so sleepiness arrives at its own pace. The reverse holds too: in narcolepsy, most of these orexin neurons are lost, the hand can no longer hold anything up, and people drop into sleep during the day without warning.
Z-drugs: positively modulate GABA-A receptors, preferring the type with the α1 subunit. Typical sizes in trials: in the short term, time to fall asleep shortens by 5–15 minutes and total sleep rises by 30–50 minutes; tolerance starts at 2–4 weeks and is clear by 6–12 weeks; dependence is moderate, and stopping abruptly brings rebound insomnia and anxiety. The boxed warning the US FDA added in 2019 to eszopiclone, zaleplon and zolpidem has only one subject: complex sleep behaviors (sleepwalking, sleep-driving, doing dangerous things while not fully awake), based on 66 reports of serious injury or death over 26 years; at the same time the drugs were contraindicated in anyone who has had such an episode. Falls, dependence and dementia are not in that box — they are a different kind of evidence, of a different strengthBenzodiazepines: amplify all types of GABA-A receptor without discrimination, so they sedate more strongly. Dependence is high and can appear within 4–6 weeks, with severe withdrawal (including a risk of seizures); long-term use can also flatten mood and worsen memory, and coming off requires a stepped taper. The dementia association sits mainly with this class: Billioti de Gage 2014 (*BMJ*) was a case-control study (1796 people with a first diagnosis of Alzheimer's disease, compared with 7184 matched controls) in which risk rose from 3 months or more of cumulative use, and the association strengthened with longer use — note that it is neither a cohort design nor a 6-month thresholdAntihistamines: besides anticholinergic side effects such as dry mouth and constipation, the higher the cumulative anticholinergic exposure, the stronger the association with later dementia (Gray 2015, *JAMA Intern Med*: a prospective cohort of 3,434 adults aged 65 and over, median follow-up 7.3 years), and tolerance comes quicklySedating antidepressants: sedating at low doses, slower to act than Z-drugs, used mainly when insomnia comes with depressionOrexin receptor antagonists: block orexin, the system that sustains wakefulness, so sleepiness arrives naturally; low risk of dependence; the main side effect is next-day drowsiness, and a very few people have sleep paralysis
How clinicians choose (5 situations):
Acute (< 4 weeks), with major stress or jet lag: a short course of a Z-drug is acceptable, while starting at the same timeChronic insomnia: CBT-I first; drugs only as an add-on, used intermittentlyInsomnia with severe depression or anxiety: treat that condition, with short-term add-on medicationInsomnia with sleep apnea: no sleeping pills (they make breathing worse); use a breathing machine () — see the Obstructive Sleep Apnea storyAdults over 65: avoid Z-drugs, benzodiazepines and first-generation antihistamines such as diphenhydramine (Benadryl) — the American Geriatrics Society's 2023 Beers Criteria list benzodiazepines, Z-drugs and first-generation antihistamines all as potentially inappropriate in people aged 65 and over, because of cognitive impairment, delirium, falls and fractures. CBT-I comes first, then nutritional tools
"I've been taking zolpidem (Ambien) for 5 years — what should I do?"
This is not unusual, and clinicians see it often. A few principles:
Don't stop suddenly. Rebound insomnia and anxiety can be worse than the original symptoms; benzodiazepines also carry a risk of seizuresTaper over 2–3 months, cutting by roughly 25% every 1–2 weeks, to give the receptors time to reset. This is a common clinical pace, not a schedule fixed by any one guideline — the actual taper has to be set by the prescriber, based on your dose, the drug and how long you have been taking itStart CBT-I at the same time — that is the real replacement, not another drugSupplements are not a substitute: if you already take magnesium 300 mg, glycine 3 g or (for anxiety) L-theanine 200 mg before bed, you can continue, but there is no evidence that they ease withdrawal — don't use them in place of a taper your doctor has plannedDon't feel ashamed — long-term Z-drug use is more a failure of doctors and the health system to deliver CBT-I than a personal failure. You can start changing it now.
In practice · A simple four-week plan
The simplest four-week planWeek 1:
Fix your wake time (weekends too)Leave at least 6 hours between caffeine and bed (Drake 2013 found caffeine taken 6 hours before bed still disrupted sleep); with insomnia, finishing it before 12 noon is saferCut blue light and bright screens after 9 pmDownload a appNote: everything this week is sleep hygiene, and the only negative recommendation in the AASM guideline is precisely not to use sleep hygiene as a single-component therapy — it clears obstacles; it does not treat. So the CBT-I app in week 2 is not optional
Week 2:
Add a sleep diary (record the time you actually slept)Start stimulus control (the bed only for sleep and sex)Magnesium 300 mg plus glycine 3 g before bed (optional; the evidence for both is weak)
Week 3:
Work out your sleep efficiency (the share of time in bed spent asleep)If it is below 85%: take these two weeks of sleep diary to a CBT-I therapist, or use the sleep restriction module in a digital program — don't compress your time in bed on your own. If it is squeezed too hard, daytime sleepiness rises sharply in the first week or two, and the risk when driving or operating machinery is real; anyone with epilepsy or a history of seizures, uncontrolled bipolar disorder, untreated sleep apnea or a parasomnia should especially not do this step on their ownAdd progressive muscle relaxation
Week 4:
Review and adjustIf the improvement is limited: see a CBT-I therapist or a sleep medicine specialist
Perfect sleep is not the goal: an occasional bad night doesn't matter; chronic insomnia is the real problem. Accepting imperfection is one of the core ideas of CBT-I — "I might sleep badly tonight, but life goes on, and so will tomorrow".
To read on:
The chapter How caffeine blocks sleepiness in the Caffeine + L-Theanine story: adenosine pressure, and how caffeine interferes with deep sleepThe chapter Why small doses are enough in the Melatonin story: why around 0.3 mg is enough, and how far the real content of products on the shelf is from their labels (Erland 2017)The chapter Muscles need it to relax in the Magnesium story: the calcium pump, and the plug in the NMDA receptorThe chapter Five jobs for one amino acid in the Glycine story: temperature regulationThe chapter How nerve cells pass messages in the Nervous System story: where (the brain's main inhibitory transmitter), benzodiazepines and Z-drugs actThe chapter How it may lower cortisol in the Ashwagandha story: chronic stress and the daily rhythm of cortisol
Chapter 5
First steps and when to see a doctor
Acute (under three months, with a clear trigger): most cases resolve on their own. What to guard against at this stage is not the insomnia itself but the rescue moves (lying in, catch-up sleep, going to bed early) that drag it into chronic insomniaChronic (three months or more): start directly; supplements only play a supporting role
Before that, rule out the four usual suspects — caffeine, a drink before bed, bright screens at night, and hard exercise too close to bedtime. They act on different chains (adenosine, the body clock, body temperature), and you can change all of them tonight.
Get help now:
Insomnia + depression + thoughts of self-harm: see mental-health or psychiatric services immediately
See a doctor soon (often more than insomnia — another condition may be behind it):
Loud snoring + pauses in breathing + extreme daytime sleepiness: sleep apnea → serious cardiovascular and neurological riskUncomfortable legs + an urge to move them: restless legs syndrome (RLS)Night terrors or violent behavior during sleep: sleep behavior disorder (RBD) — possibly an early forerunner of Parkinson's diseaseSuddenly dropping into sleep during the day: narcolepsy — rare but seriousInsomnia + palpitations, rapid weight loss, heat intolerance: get checked for hyperthyroidism
Mechanism · Four common culprits and where each hits
Caffeine: sleep pressure builds from a metabolic leftover called adenosine — the longer you are awake, the more it piles up, and only when enough has piled up do you feel sleepy. Caffeine looks like adenosine; it can sit in the same receptor pocket and do nothing, so the pressure keeps building but you cannot read it. The body breaks it down slowly, so a good share of the afternoon cup is often still there when you go to bed, blocking exactly the stretch of pressure that most needs to be read.Alcohol before bed: at first it really does press the brake — it strengthens , the brain's main inhibitory (braking) signal, which is why many people drop off after a drink. But once the liver has finished breaking the alcohol down, the suppressed excitation snaps back all at once: repeated waking in the second half of the night, a racing heart, sweating, thirst. It also squeezes sleep out of the first half of the night and forces it to rebound in the second half, so dreams multiply and sleep fragments. Using alcohol to sleep trades the second half of the night for the first — and the second half is when emotion and memory are being filed.
A bright screen at night: a small group of brightness-only light sensors in the retina send how bright it is outside to the master clock in the hypothalamus, the suprachiasmatic nucleus (). If the SCN decides it is still daytime, it keeps the pineal gland held down, and the start of melatonin is pushed later as a whole — your sleepiness moves later with it. So the problem is not only content that is too stimulating; it is that your night has been delayed.
Hard exercise too close to bedtime: falling asleep needs core temperature to drop, and vigorous exercise pushes up both temperature and the sympathetic nervous system; you cannot sleep until they come back down.
But this one should be stated more carefully than the other three. Stutz 2019 pooled 23 studies (healthy adults, a single evening exercise session compared with none) and concluded that evening exercise as a whole does not harm sleep, and even leans slightly helpful (deep sleep up 1.3 percentage points, stage 1 light sleep down 0.9). What actually matches the mechanism is its moderator analysis: a body temperature still high at bedtime was what went with lower sleep efficiency and more night waking. So what to avoid is not evening exercise; it is vigorous exercise that ends within 1 hour of bedtime.
Note that the flagged a limit of its own: after one study was removed, every significant moderator effect disappeared — so the dose line above is the best current estimate, not a hard threshold.
The four act on different chains, which is why cutting coffee while leaving the bright screen alone often feels like nothing at all — if another chain is the broken one, that is not the one you are repairing.
In practice · Step by step, and when to refer
Taken step by step, the rhythm is roughly this:Week 1 · Self-check and basics:
Acute or chronic?Acute (under 3 months) with a trigger (stress, jet lag, illness): most cases settle on their own; keep up simple sleep hygiene, with short-term supplements if you likeChronic (3 months or more): start
Basic checks:Caffeine (afternoon, evening)Blue light (phone and TV in the evening)Alcohol (before bed)Exercise (only vigorous exercise that ends within 1 hour of bedtime counts; daytime and early-evening exercise helps sleep)Bedroom environment (noise, light, temperature)
Weeks 2–4 · Start CBT-I and nutritional tools:
CBT-I: a digital app, or book a therapistMagnesium 300 mg plus glycine 3 g before bed (optional)If anxiety is prominent, add L-theanine 200 mgKeep a sleep diary
Weeks 4–8 · Assess:
Is sleep efficiency at 85% or above?Do you feel better?Is daytime functioning better?
No improvement after 8 weeks: get referred to a sleep medicine specialist:
Rule out other causes (sleep apnea, restless legs syndrome, parasomnias, mental-health conditions)If sleep apnea is suspected, have (PSG, an overnight test that records brain waves, breathing and blood oxygen)
Living with long-term insomnia:
Nobody can promise you 8 hours every night: even when treatment works, an occasional bad night is normalThe goal: enough sleep on most nights, usable days, and a reasonable overall quality of lifePerfectionist thinking makes insomnia worse — loosening that tightness is one of the aims of CBT-I
One last point: don't let insomnia define you. Insomnia is an experience, not an identity. While you work on it, keep doing the things that make life feel full — work, relationships, interests — they are themselves part of managing insomnia.
References · 12
- Edinger, J. D., Arnedt, J. T., Bertisch, S. M., et al. (2021). Behavioral and psychological treatments for chronic insomnia disorder in adults: an American Academy of Sleep Medicine clinical practice guideline. Journal of Clinical Sleep Medicine, 17(2), 255-262. 10.5664/jcsm.8986
- Trauer, J. M., Qian, M. Y., Doyle, J. S., Rajaratnam, S. M. W., & Cunnington, D. (2015). Cognitive behavioral therapy for chronic insomnia: a systematic review and meta-analysis. Annals of Internal Medicine, 163(3), 191-204. 10.7326/M14-2841
- Drake, C., Roehrs, T., Shambroom, J., & Roth, T. (2013). Caffeine effects on sleep taken 0, 3 or 6 hours before going to bed. Journal of Clinical Sleep Medicine, 9(11), 1195-1200. Randomized, double-blind, placebo-controlled Latin-square crossover in 12 healthy normal sleepers: one fixed 400 mg dose of caffeine (the authors call it moderate) at 0, 3 or 6 h before habitual bedtime vs placebo, sleep measured at home by diary and a portable monitor. All three timings disrupted sleep vs placebo (P < 0.05). By the objective monitor, even at 6 h caffeine reduced sleep by more than 1 hour; by diary, the 6-h reduction in total sleep time (41 min) only approached significance (p = 0.08). The authors conclude that substantial caffeine should be avoided for a minimum of 6 hours before bedtime, and that afternoon caffeine should at least be restricted to before 17:00 (abstract, PMID 24235903; full text, PMC3805807). 10.5664/jcsm.3170
- Brzezinski, A., et al. (2005). Effects of exogenous melatonin on sleep: a meta-analysis. Sleep Medicine Reviews, 9(1), 41–50. 17 studies, 284 subjects: melatonin reduced sleep onset latency by 4.0 min (95% CI 2.5-5.4), increased sleep efficiency by 2.2% (0.2-4.2) and total sleep by 12.8 min (2.9-22.8); in the 15 studies of healthy people or people with insomnia only: 3.9 min, 3.1% and 13.7 min (abstract, PMID 15649737). 10.1016/j.smrv.2004.06.004
- Yamadera, W., Inagawa, K., Chiba, S., Bannai, M., Takahashi, M., & Nakayama, K. (2007). Glycine ingestion improves subjective sleep quality in human volunteers, correlating with polysomnographic changes. Sleep and Biological Rhythms, 5(2), 126-131. 10.1111/j.1479-8425.2007.00262.x
- Herxheimer, A., & Petrie, K. J. (2002). Melatonin for the prevention and treatment of jet lag. Cochrane Database of Systematic Reviews, (2), CD001520. 10 trials in airline passengers, staff or military personnel (all vs placebo, one also vs zolpidem): 9 of 10 found that melatonin taken close to target bedtime at the destination (10 pm to midnight) decreased jet lag from flights crossing 5 or more time zones. Daily doses of 0.5-5 mg were similarly effective (5 mg gives faster, better sleep than 0.5 mg); above 5 mg no more effective; 2 mg slow-release was relatively ineffective. NNT 2. Benefit is likely greater the more zones crossed and less for westward flights; taken early in the day it can cause sleepiness and delay adaptation; case reports suggest harm in people with epilepsy and those on warfarin (abstract, PMID 12076414). 10.1002/14651858.CD001520
- US Food and Drug Administration. (2019). FDA adds boxed warning for risk of serious injuries caused by sleepwalking with certain prescription insomnia medicines (Drug Safety Communication, April 30, 2019). The boxed warning added to eszopiclone, zaleplon and zolpidem covers COMPLEX SLEEP BEHAVIOURS ONLY - sleepwalking, sleep-driving and other activities while not fully awake - after 66 reported cases of serious injury or death over 26 years. The agency also contraindicated these drugs in patients who have previously experienced such an episode. Falls, dependence and dementia are NOT part of the boxed warning. www.fda.gov/drugs/drug-safety-and-availability/fda-adds-boxed-warning-risk-serious-injuries-caused-sleepwalking-certain-prescription-insomnia
- By the 2023 American Geriatrics Society Beers Criteria Update Expert Panel. (2023). American Geriatrics Society 2023 updated AGS Beers Criteria for potentially inappropriate medication use in older adults. Journal of the American Geriatrics Society, 71(7), 2052-2081. Benzodiazepines, non-benzodiazepine 'Z-drug' hypnotics and first-generation antihistamines are all listed as potentially inappropriate in adults 65 and older, on the basis of cognitive impairment, delirium, falls and fractures. 10.1111/jgs.18372
- Billioti de Gage, S., Moride, Y., Ducruet, T., Kurth, T., Verdoux, H., Tournier, M., Pariente, A., & Begaud, B. (2014). Benzodiazepine use and risk of Alzheimer's disease: case-control study. BMJ, 349, g5205. Case-control study in the Quebec health insurance database: 1,796 people with a first diagnosis of Alzheimer's disease matched to 7,184 controls. Benzodiazepine use of three months or more was associated with increased risk, and the association strengthened with longer cumulative exposure. 10.1136/bmj.g5205
- Gray, S. L., Anderson, M. L., Dublin, S., Hanlon, J. T., Hubbard, R., Walker, R., Yu, O., Crane, P. K., & Larson, E. B. (2015). Cumulative use of strong anticholinergics and incident dementia: a prospective cohort study. JAMA Internal Medicine, 175(3), 401-407. Prospective cohort of 3,434 adults aged 65+ followed a median 7.3 years. Higher cumulative anticholinergic exposure was associated with incident dementia; first-generation antihistamines such as diphenhydramine were among the most commonly used strong anticholinergics in the cohort. 10.1001/jamainternmed.2014.7663
- Erland, L. A. E., & Saxena, P. K. (2017). Melatonin natural health products and supplements: presence of serotonin and significant variability of melatonin content. Journal of Clinical Sleep Medicine, 13(2), 275–281. 10.5664/jcsm.6462
- Stutz, J., Eiholzer, R., & Spengler, C. M. (2019). Effects of evening exercise on sleep in healthy participants: A systematic review and meta-analysis. Sports Medicine, 49(2), 269-287. Twenty-three studies of a single evening exercise session versus a no-exercise control in healthy adults, screened from 11,717 references. Versus control, evening exercise significantly increased REM latency (+7.7 min) and slow-wave sleep (+1.3 percentage points) and decreased stage 1 sleep (-0.9 pp). Moderator analyses linked a higher body temperature at bedtime to lower sleep efficiency (-11.6 pp) and more wake after sleep onset (+37.6 min), and higher physical stress relative to habitual activity to lower sleep efficiency (-3.2 pp) and more wake after sleep onset (+21.9 min). Conclusion: the studies do not support the hypothesis that evening exercise negatively affects sleep, rather the opposite; however sleep-onset latency, total sleep time and sleep efficiency might be impaired after vigorous exercise ending 1 hour or less before bedtime. IMPORTANT LIMIT stated by the authors: all significant moderating effects disappeared after removal of one study, so the moderator findings are fragile. 10.1007/s40279-018-1015-0