Most insomnia traces back to a handful of common causes, and the fix that matters first depends on which one matches your pattern.
Acute or chronic: which one you have
Short-term (acute) insomnia lasts a few days or weeks and often follows a stressful event, a schedule change or a new environment. Chronic insomnia happens three or more nights a week, lasts three months or longer, and is not fully explained by another health problem. The US National Institutes of Health uses these thresholds.
The distinction matters. Short-term insomnia usually fades once the stressor does. Chronic insomnia often outlasts its trigger, because habits built around poor sleep, such as lying awake, watching the clock and napping to make up lost sleep, keep it going.
Self-check: find your pattern
For two weeks, note when you went to bed, how long you took to fall asleep, how often you woke, and when you woke for good. Then answer these questions. Each yes points to a section below.
- Does trouble falling asleep, staying asleep or waking too early happen at least three nights a week? Note how many weeks or months it has lasted. (Chronic pattern, see the CBT-I section.)
- Do you lie in bed worrying, planning or checking the clock? (Stress and racing mind.)
- Does your wake time shift by more than an hour between weekdays and weekends, or do you work shifts or travel often? (Schedule and light.)
- Do you drink tea, coffee, cola or energy drinks after noon, or have a drink to help you fall asleep? (Caffeine and alcohol.)
- Do you use your phone, laptop or TV in bed or in the last hour before sleep? (Screens.)
- Do you snore loudly, pause in breathing, gasp, or feel very sleepy in the day? (Possible sleep apnea.)
- Does pain, heartburn or an urge to move your legs wake you? (Medical causes.)
- Did your sleep change after a new medicine, cold remedy or dose change? (Medicines.)
- Are you in perimenopause, or do night sweats or hot flushes wake you? (Hormones.)
If two or more yes answers fall in the same group, start there. If they are spread out, begin with the schedule and caffeine fixes, which cost nothing and suit almost anyone.
Recommended Products
If you have worked through the self-check and want a product to pair with the habit changes below, these are the Stack options.
The causes, grouped by what drives them
Most people have more than one driver, but one group usually stands out. The table at the end lists the first check for each.
Stress and a racing mind
Worry about school, work, money, relationships or a loss raises the risk of insomnia, and the worry often returns at bedtime. Clock-watching makes it worse. Each glance at the time starts a sum about how little sleep is left, which keeps you alert. Stress hormones are part of this loop; The Stack's guide to cortisol and sleep explains how.
Schedule and light
Your body clock runs on a roughly daily rhythm. Irregular wake times, shift work, travel across time zones and bright light late at night push that rhythm out of step. Long daytime naps and too little daytime activity add to the problem. A sign of this cause is feeling wide awake at 1 am on weekends but sleepy only after midnight on weekdays. This cause is among the easiest to fix.
Caffeine and alcohol
Caffeine stays active for hours, and its effect on sleep is often underestimated. In a randomised, double-blind, placebo-controlled trial of 12 healthy sleepers, 400 mg of caffeine taken 0, 3 or 6 hours before bedtime cut total sleep by 1.1 to 1.2 hours compared with placebo at each timing. Even the 6-hour dose cut sleep by more than an hour.1 The authors estimated 400 mg as about four 8-oz cups of home-brewed coffee. Tea, cola, energy drinks and some dark chocolate also contain caffeine.
Alcohol can make you drowsy at first, then disturb the second half of the night, when sleep becomes lighter and more broken. The NHLBI advises avoiding alcohol close to bedtime, and relying on a drink to sleep worsens chronic insomnia over time.
Screens in bed
Phones, laptops and TV keep the mind engaged when it should be winding down. Scrolling in bed also links the bed with alertness, which works against the habits in CBT-I. The NHLBI lists using electronic devices close to bedtime as a risk factor. Keep devices out of the bed and switch to low-stimulation activities for the final hour.
Medical causes: thyroid, reflux, sleep apnea and pain
Several medical conditions cause or worsen insomnia, and they are easy to miss because the main complaint is about sleep. An overactive thyroid (hyperthyroidism) can cause insomnia alongside a racing heart, weight loss, tremor and heat intolerance. Gastro-oesophageal reflux (heartburn) can wake you when stomach acid rises while you lie down. Chronic pain can make it hard to settle and stay asleep.
Sleep apnea deserves particular attention. Breathing pauses or becomes shallow during sleep, and the brain wakes you briefly to restart it. Warning signs include loud snoring, gasping or choking at night, morning headaches, and daytime sleepiness. Restless legs syndrome, with uncomfortable urges to move the legs at night, is another medical cause. No supplement treats these, so if they fit, see a doctor for testing.
Medicines
Several common medicines list sleep problems as a side effect, including some antidepressants, corticosteroids, decongestants in cold remedies, and some asthma treatments. Read the leaflet for any new medicine, and note whether your sleep changed after starting it or changing the dose. Do not stop a prescribed medicine on your own; ask the prescriber whether a different medicine, timing or dose is an option.
Hormones and perimenopause
Insomnia is more common in women, and hormone changes during pregnancy and menopause can disturb sleep, according to the NHLBI. In perimenopause, hot flushes and night sweats are a frequent reason for waking. Track whether your sleep problems line up with cycle changes or night sweats, and bring the log to your doctor. Hormone treatment decisions belong with a clinician.
| Cause group | Typical sign | First check |
|---|---|---|
| Stress and racing mind | Looping thoughts, clock-watching in bed | Worry routine earlier in the evening; leave bed when awake |
| Schedule and light | Late sleepiness, weekend shifts, jet lag | Fixed wake time; morning daylight |
| Caffeine and alcohol | Trouble falling asleep; broken second half of night | Last caffeine at least six hours before bed; no drink to sleep |
| Screens | Alert at bedtime; phone in bed | Devices out of bed; low-stimulation last hour |
| Medical | Snoring with gasping, heartburn, pain, leg urges | Doctor review, including sleep apnea testing if signs fit |
| Medicines | Sleep changed after a new drug or dose | Check the leaflet; ask the prescriber |
| Hormones | Night sweats, hot flushes, cycle-linked waking | Symptom log to share with a doctor |
What to fix first, in order
The order puts the cheapest, most reversible changes first. Give the first three a steady run of a few weeks before judging them. Medical checks come last only because they need a clinician.
- Fix your wake time. Get up at the same time every day, including weekends, and spend the first part of the morning in daylight. The wake time sets the clock that decides when you feel sleepy.
- Move caffeine earlier. Stop caffeine at least six hours before bed. Check tea, cola, energy drinks and some pre-workout products, not just coffee.
- Stop using alcohol as a sleep aid. Alcohol can help you drop off, but it disrupts the second half of the night.
- Stop lying awake. If you cannot sleep after a long stretch in bed, get up, sit somewhere dim, do something calm, and return only when sleepy. This is the stimulus control technique from CBT-I.
- Clear the last hour of screens. Keep phones and laptops out of the bedroom if you can.
- Write the worry down earlier. In the early evening, spend 10 to 15 minutes writing tomorrow's tasks and open worries. Getting them on paper is a common CBT-I technique for racing thoughts.
- Get a medical and medicine review. If the pattern persists after steady changes, or any warning sign below applies, see a doctor. Do not change medicines without advice.
CBT-I: the first-line treatment
Cognitive behavioural therapy for insomnia (CBT-I) is the recommended first treatment for chronic insomnia. The American College of Physicians recommends it for all adults with chronic insomnia before medicines, and the American Academy of Sleep Medicine's 2021 guideline gives multicomponent CBT-I a strong recommendation. It combines:
- Sleep restriction: limiting time in bed to about the amount you actually sleep, then extending it gradually as sleep improves.
- Stimulus control: using the bed only for sleep and leaving it when awake for a long time.
- Cognitive therapy: challenging beliefs such as "I must get eight hours or tomorrow is ruined."
- Relaxation and sleep education.
A 2015 systematic review and meta-analysis of 20 randomised trials, with 1,162 adults, found that CBT-I shortened the time to fall asleep by about 19 minutes and reduced time awake after sleep onset by about 26 minutes. Sleep efficiency improved by about 10 percentage points. The gain in total sleep time was smaller and not statistically significant, and the trials reported no adverse outcomes.2 The AASM guideline notes that daytime fatigue and irritability are the main early side effects, and they usually ease by the end of treatment.
Sleep hygiene advice alone is not enough. The AASM guideline suggests against using it as a single treatment, so pair the habit changes with the bed-related techniques above. CBT-I can be delivered in person, in a group, online, or through a structured self-help book.
Where magnesium and glycine fit, and where they do not
Both ingredients are often suggested for sleep. The evidence is much weaker than for CBT-I, so they are optional extras that come after the causes above have been checked.
Magnesium bisglycinate
A 2021 systematic review and meta-analysis pooled three randomised trials with 151 older adults. Oral magnesium was associated with falling asleep about 17 minutes faster than placebo, but the gain in total sleep time was not statistically significant. The authors rated the evidence as too weak for physicians to make well-informed recommendations.3
A 2025 randomised, double-blind trial tested magnesium bisglycinate in 155 adults aged 18 to 65 who reported poor sleep, at 250 mg of elemental magnesium a day against placebo. By week four, Insomnia Severity Index scores had fallen about 1.6 points more in the magnesium group. The effect size was small, and the authors called the benefit modest.4
The trial dose was about 2.7 times the 92.2 mg of elemental magnesium in one magnesium bisglycinate capsule of Deep Rest, so the trial result does not transfer directly. Follow the label directions. Keep total magnesium from supplements and medicines within the 350 mg daily upper limit for adults set by the US National Institutes of Health's Office of Dietary Supplements, unless a doctor advises otherwise.
Where it fits: an adult with poor sleep, no identified medical cause, no pregnancy concern and no interaction with current medicines, who already has the schedule and caffeine basics in place. Where it does not: it does not offset a late coffee, an irregular wake time, sleep apnea, reflux, pain, a medicine side effect or hormone-related night sweats.
Glycine
The glycine study cited here used a short-term sleep-restriction model in healthy adults, not people with chronic insomnia. In a randomised, single-blinded crossover trial, seven healthy men whose sleep was cut back by about a quarter took 3 g of glycine, the same amount as one Dream On serve, 30 minutes before bed for three nights. Subjective fatigue the next day was lower on the first day, though not the third. Reaction times on a vigilance test improved on both days.5 The volunteers had no sleep complaints, the trial was small, and the authors are based at Ajinomoto, a Japanese food company that makes amino acids. The result is early evidence.
Where it fits: an adult with occasional short nights who wants a simple bedtime option and a clearer head the next morning. Where it does not: chronic insomnia, sleep apnea, restless legs, or any sleep problem with a clear medical cause.
The Complete Sleep Stack pairs magnesium bisglycinate and glycine. Neither cited study tested this pairing, so its combined effect is not established.
When to see a doctor
See a doctor if any of these apply:
- Trouble sleeping at least three nights a week for three months or longer.
- Loud snoring, pauses in breathing, gasping or choking at night, or morning headaches and daytime sleepiness.
- Strong urges to move your legs, especially at night.
- Heavy sleepiness during the day, especially when driving.
- Heartburn that wakes you at night, or pain that stops you sleeping.
- Weight change, racing heart, tremor or heat intolerance, which can point to a thyroid problem.
- Low mood, anxiety or hopelessness lasting more than two weeks.
- Sleep changes after a new medicine, or reliance on sleeping pills or alcohol.
If you have thoughts of harming yourself, contact a local emergency number or a crisis helpline right away. Your doctor may check for the causes above, review your medicines and discuss CBT-I. The ACP advises a shared decision about short-term sleep medicines, because they carry risks.
For more on sleep and nutrition, read The Stack's guide to common sleep disorders and the deficiencies associated with them, and The Stack's overview of sleep hygiene and how to maintain it.
Frequently asked questions
Can insomnia go away on its own?
Short-term insomnia often does, once the stress or schedule change behind it passes. Chronic insomnia is less likely to clear without changes, because the habits built around poor sleep keep it going.
Is afternoon coffee really a problem for sleep?
Yes, at least in healthy sleepers. In the 2013 caffeine trial, 400 mg taken six hours before bed still cut total sleep by more than an hour. Sensitivity varies between people, so track your own response.
Can I learn CBT-I without a therapist?
Yes, though support helps. Self-help books and online programmes are among the formats used. In-person delivery by a trained provider has the most research behind it, so if the first attempt does not help, a clinician or sleep specialist can guide the next step.
Can I take Deep Rest and Dream On together?
Neither cited study tested this pairing. If you take prescription medicines, are pregnant or breastfeeding, or have a medical condition, check with your doctor or pharmacist before starting either product.
Should I take a sleeping pill?
Only with a doctor's advice. Sleep medicines carry risks, including dependence and daytime grogginess, and are generally used for the shortest possible period. Never combine them with alcohol.
How long before a supplement shows an effect?
The 2025 magnesium trial measured outcomes at week four. The product guidance says many people notice changes within two to three weeks of consistent use, but individual results vary. Judge any supplement after several weeks of steady use alongside the habit changes.
Disclaimer: This article is for general education and is not medical advice. It does not diagnose, treat, cure or prevent insomnia or any other condition. Speak to a qualified healthcare professional about persistent sleep problems, before starting any supplement, and if you are pregnant, breastfeeding, have a medical condition or take medicines.
References
- Drake C, Roehrs T, Shambroom J, Roth T. Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed. Journal of Clinical Sleep Medicine. 2013;9(11):1195-1200. PubMed 24235903
- Trauer JM, Qian MY, Doyle JS, Rajaratnam SM, Cunnington D. Cognitive behavioral therapy for chronic insomnia: a systematic review and meta-analysis. Annals of Internal Medicine. 2015;163(3):191-204. PubMed 26054060; DOI 10.7326/M14-2841
- Mah J, Pitre T. Oral magnesium supplementation for insomnia in older adults: a systematic review and meta-analysis. BMC Complementary Medicine and Therapies. 2021;21:125. PubMed 33865376; DOI 10.1186/s12906-021-03297-z
- Schuster J, Cycelskij I, Lopresti A, Hahn A. Magnesium bisglycinate supplementation in healthy adults reporting poor sleep: a randomized, placebo-controlled trial. Nature and Science of Sleep. 2025;17:2027-2040. PubMed 40918053; DOI 10.2147/NSS.S524348
- Bannai M, Kawai N, Ono K, Nakahara K, Murakami N. The effects of glycine on subjective daytime performance in partially sleep-restricted healthy volunteers. Frontiers in Neurology. 2012;3:61. PubMed 22529837; DOI 10.3389/fneur.2012.00061