Poor sleep destroys everything else. Here is how to fix it for good.
You are lying awake at 2am for the third night in a row, watching the clock, getting more anxious with each passing hour, and dreading the exhausted day ahead. Maybe this has been happening for weeks, maybe for years. You have tried going to bed earlier, avoiding caffeine, and counting sheep -- and none of it has worked.
Sleep is not a passive recovery state -- it is when your brain consolidates memories, clears metabolic waste products, regulates hormones, and repairs cellular damage. Chronic poor sleep is linked to increased risk of depression, anxiety, cardiovascular disease, obesity, type 2 diabetes, and Alzheimer's disease. It also impairs cognitive function at a level comparable to legal intoxication. This is not something to just push through.
Insomnia is not a single condition -- it manifests in different ways that point to different causes and solutions. Sleep-onset insomnia (difficulty falling asleep) often relates to anxiety, an overactive mind, or poor sleep environment. Sleep-maintenance insomnia (waking in the middle of the night and struggling to fall back asleep) can indicate sleep apnea, blood sugar fluctuations, alcohol use, or cortisol dysregulation. Early morning awakening (waking hours before your intended time and being unable to return to sleep) is frequently associated with depression or anxiety. Identifying your pattern is the first step toward fixing it.
Before trying supplements, medications, or therapies, ensure you have addressed the foundational factors that undermine sleep quality. These include: a consistent wake time (the single most powerful circadian anchor), keeping your bedroom cool (65-68ยฐF is the evidence-based ideal), complete darkness, eliminating alcohol within 3 hours of bedtime, cutting caffeine after 2pm (caffeine has a 5-7 hour half-life), and reducing screen use in the 60 minutes before bed. These are not soft suggestions -- they are the non-negotiable foundation.
Your circadian rhythm is a biological clock that regulates sleepiness and wakefulness on roughly a 24-hour cycle. Irregular sleep times -- sleeping in on weekends, staying up late some nights and not others -- disrupt this clock and create what researchers call 'social jet lag.' The single most evidence-based behavioral intervention for insomnia is a fixed wake time maintained 7 days a week, regardless of how poorly you slept the night before. Your body will consolidate sleep more efficiently once the clock is anchored.
Cognitive Behavioral Therapy for Insomnia (CBT-I) is the gold-standard, first-line treatment for chronic insomnia -- more effective than sleep medications in long-term studies and without the dependency risks. CBT-I includes sleep restriction therapy (temporarily limiting your time in bed to build sleep pressure), stimulus control (reserving the bed only for sleep and sex), cognitive restructuring (addressing anxiety-driven thoughts about sleep), and relaxation training. It typically takes 6-8 sessions with a trained therapist, but digital CBT-I programs have also shown strong efficacy.
The supplement market is flooded with sleep products of wildly varying quality and evidence. Melatonin is best supported for circadian rhythm disruption (jet lag, shift work, delayed sleep phase syndrome) rather than core insomnia -- 0.5-1mg is the evidence-based dose, not the 5-10mg commonly sold. Magnesium glycinate has reasonable evidence for improving sleep quality, particularly in people who are deficient. L-theanine promotes relaxation without sedation and is well-tolerated. Ashwagandha has modest evidence for reducing sleep onset time. Valerian, despite its popularity, has inconsistent evidence. Most people should start with one intervention at a time to assess its effect.
One of the most insidious aspects of chronic insomnia is that the anxiety about not sleeping becomes its own cause of not sleeping. Lying in bed watching the clock, calculating how many hours of sleep you will get, and catastrophizing about the next day all activate the arousal system that prevents sleep onset. Breaking this loop requires specific techniques: getting out of bed if you have been awake for 20+ minutes (stimulus control), practicing paradoxical intention (trying NOT to fall asleep to reduce sleep effort), and using structured relaxation techniques like progressive muscle relaxation or 4-7-8 breathing.
Persistent insomnia despite addressing behavioral factors warrants a medical evaluation. Sleep apnea -- characterized by pauses in breathing during sleep, loud snoring, and waking unrefreshed -- affects an estimated 25% of men and 10% of women and is dramatically underdiagnosed, particularly in women. Restless leg syndrome creates uncomfortable sensations in the legs at night that disrupt sleep onset. Thyroid disorders, iron deficiency, chronic pain, GERD, and nocturia (frequent nighttime urination) can all cause or worsen insomnia. A home sleep study to rule out sleep apnea is relatively inexpensive and widely available.
If you need medication in the short term, understand the landscape. Prescription options include Z-drugs (zolpidem/Ambien, eszopiclone/Lunesta), which are effective for sleep onset but carry dependency risks and should generally not be used for more than 2-4 weeks. Low-dose doxepin is effective for sleep maintenance. Suvorexant (Belsomra) works differently from benzodiazepines and has a better safety profile for longer-term use. Over-the-counter antihistamine-based sleep aids (diphenhydramine) lose effectiveness rapidly and worsen cognitive function the next day. Any medication should be paired with behavioral strategies -- medication treats the symptom while CBT-I addresses the cause.
Sleep apnea is one of the most underdiagnosed sleep disorders, particularly in women, people who are not overweight, and those without the 'classic' presentation of loud snoring. Untreated sleep apnea causes fragmented sleep architecture -- you may spend enough hours in bed but never reach the deep, restorative sleep stages. It is also linked to serious cardiovascular, metabolic, and cognitive consequences. Many people with sleep apnea have no idea they have it; they just know they sleep for 8 hours and still feel exhausted.
The health copilot can walk you through the validated STOP-BANG screening questionnaire for sleep apnea and help you evaluate whether your symptoms warrant a home sleep study or referral to a sleep specialist.
Many common medications interfere with sleep as a side effect that is frequently not mentioned by prescribing physicians. SSRIs and SNRIs can delay sleep onset and increase night waking. Beta-blockers reduce melatonin production. Stimulants (including ADHD medications) delay sleep. Corticosteroids are highly activating. Diuretics cause nocturia. Even some antihistamines that are marketed as sleep aids cause next-day cognitive impairment. If you started having sleep problems around the same time you started a new medication, the connection is worth investigating.
The medication copilot can review your complete medication list and identify which drugs are most likely to be contributing to your sleep disruption, including recommendations for timing changes or alternatives to discuss with your doctor.
Sleep disorders and mental health conditions are deeply intertwined and each worsens the other. Insomnia is both a symptom and a risk factor for depression and anxiety -- people with chronic insomnia are 10 times more likely to develop depression than normal sleepers. Anxiety typically produces sleep-onset insomnia (difficulty falling asleep due to an active, worried mind), while depression more often produces early morning awakening. If your sleep problems are accompanied by persistent low mood, excessive worry, loss of interest in activities, or other mental health symptoms, treating only the sleep problem without addressing the mental health dimension is unlikely to produce lasting results.
The mental health copilot can help you screen for anxiety and depression symptoms that may be underlying your sleep difficulties and provide guidance on whether addressing mental health -- through therapy, medication, or both -- should be part of your sleep treatment plan.
Many people with poor sleep have distorted perceptions of how much they are actually sleeping. Sleep state misperception -- where people feel they slept very little but objective measurement shows adequate sleep -- affects a significant subset of insomnia patients. Conversely, people using consumer sleep trackers may be experiencing 'orthosomnia' -- anxiety driven by inaccurate tracker data. Understanding what your actual sleep architecture looks like, and whether your subjective experience matches objective reality, is important for accurate diagnosis and treatment.
The sleep copilot can help you interpret data from consumer sleep trackers with appropriate caveats, guide you on keeping an accurate sleep diary, and explain what healthy sleep architecture actually looks like across different age groups.
The '8 hours' recommendation is a population average, not a universal prescription. Genetic variation means that some individuals genuinely function well on 6-6.5 hours (short sleepers) while others need 9-10 hours. The distinction between a genuine short sleeper and someone who is chronically sleep-deprived and has adapted to it is important: chronically sleep-deprived people typically show performance impairment on objective tests even when they subjectively feel fine. Your actual sleep need is best assessed by how you feel after several weeks of unstructured sleep -- like during vacation -- when your body catches up and settles into its natural pattern.
The sleep copilot can help you design a sleep need assessment protocol and interpret the results, as well as identify whether any daytime symptoms you are experiencing are consistent with genuine sleep insufficiency versus other causes of fatigue.
To fix insomnia effectively, it helps to understand what sleep actually is and why yours is not working. Sleep is not a simple on/off state -- it is a complex, actively regulated physiological process governed by two distinct biological systems that must work together.
The first is your circadian rhythm -- a roughly 24-hour internal clock located in the suprachiasmatic nucleus of your brain that regulates when you feel sleepy and when you feel alert. This clock is primarily set by light exposure, particularly morning light (which advances the clock and promotes earlier sleep timing) and evening light (which delays it). Disrupting your circadian rhythm through irregular schedules, shift work, or excessive artificial light at night creates a misalignment between when your clock wants you to sleep and when you are trying to sleep -- and this misalignment causes insomnia regardless of how tired you feel. The NIH's Brain Basics guide on sleep provides an accessible overview of the neuroscience of sleep architecture.
The second system is sleep pressure (technically, adenosine accumulation). Adenosine is a byproduct of neural activity that builds up in your brain throughout the day, creating increasing pressure to sleep. When you go to sleep, adenosine is cleared. Caffeine works by blocking adenosine receptors, which is why it keeps you awake -- and why the crash when it wears off feels so dramatic. Napping during the day reduces your sleep pressure for the night, which is why long or late naps worsen nighttime insomnia. The sleep restriction component of CBT-I works by deliberately building up sleep pressure through mild temporary sleep deprivation.
Chronic insomnia develops when a third factor enters the picture: hyperarousal. Whether triggered by stress, anxiety, pain, or a one-off bad night, some people develop a conditioned association between the bedroom and wakefulness -- their nervous system learns that bed is a place of vigilance rather than rest. This hyperarousal can persist long after the original trigger has resolved, which is why short-term situational insomnia can become chronic. If burnout is a contributing factor to your sleep problems, see our companion guide on burnout recovery, which addresses the stress-sleep relationship directly. The sleep coach copilot can help you understand which of these three systems is most disrupted in your case and tailor the intervention accordingly.
Cognitive Behavioral Therapy for Insomnia (CBT-I) has the strongest evidence base of any insomnia treatment -- multiple randomized controlled trials and meta-analyses have found it more effective than prescription sleep medications at 6-month follow-up, with benefits that persist after treatment ends (unlike medication benefits, which disappear when the drug is stopped). The American College of Physicians recommends CBT-I as the first-line treatment for chronic insomnia before medication is considered.
CBT-I consists of several distinct components that work together. Sleep restriction therapy is counterintuitive but highly effective: you temporarily restrict your time in bed to roughly the amount of time you are actually sleeping (for example, 6 hours if you are sleeping 6 hours but spending 8 hours in bed). This builds intense sleep pressure, consolidates your sleep into a more efficient block, and breaks the association between lying in bed awake. Over 1-2 weeks, you gradually expand your sleep window as efficiency improves. This technique can be challenging in the first week as you feel temporarily more tired, but results are typically significant by week 3-4.
Stimulus control is the second cornerstone: using your bed only for sleep and sex, getting out of bed if you are awake for more than 20 minutes, and eliminating activities like reading, watching TV, working, or scrolling in bed. The goal is to re-associate the bed with sleepiness rather than wakefulness. Most insomniacs have unknowingly trained their nervous system to be alert in bed through months or years of lying awake there.
Cognitive restructuring addresses the thought patterns that maintain insomnia -- catastrophizing about the consequences of poor sleep, developing rigid beliefs about how much sleep you need, and anxiety about the act of sleeping itself. Common cognitive distortions include 'I need exactly 8 hours or I won't function,' 'I haven't slept properly in months and something is seriously wrong with me,' and 'I will never be able to sleep normally again.' These thoughts are objectively inaccurate and actively worsen the arousal that prevents sleep. The sleep coach copilot can guide you through the core CBT-I components with personalized support adapted to your specific insomnia pattern.
The sleep supplement market generates billions of dollars annually, much of it from products with minimal or no evidence of efficacy. Cutting through the marketing to understand what actually works -- and for which sleep problem -- can save you significant money and frustration.
Melatonin is the most widely used sleep supplement, but it is frequently misused. Melatonin is not a sedative -- it is a darkness signal that tells your circadian clock it is nighttime. This makes it highly effective for circadian rhythm disorders (jet lag, shift work, delayed sleep phase syndrome) and somewhat effective for sleep initiation in older adults (who produce less melatonin naturally). For most middle-of-the-night insomnia, standard melatonin does nothing. The commonly sold doses of 5-10mg are pharmacologically excessive -- research shows 0.5-1mg is as effective as higher doses for circadian effects, with fewer next-day residual effects. Extended-release formulations (like Circadin) may be more helpful for sleep maintenance.
Magnesium glycinate has emerging evidence for improving sleep quality, particularly in people who are deficient (which is common -- estimates suggest 50-70% of Americans have insufficient magnesium intake). It works by supporting GABA activity (the brain's primary inhibitory neurotransmitter) and reducing cortisol. Typical effective doses are 200-400mg of elemental magnesium in the glycinate form, taken 1-2 hours before bed. The oxide and citrate forms have less bioavailability for sleep purposes.
L-theanine, found naturally in green tea, promotes alpha brain wave activity associated with relaxed alertness and appears to reduce sleep onset time without causing sedation. It is well-tolerated at 100-200mg and pairs well with magnesium. Ashwagandha (KSM-66 extract, 300-600mg) has shown modest benefits for sleep quality and anxiety in several trials. Phosphatidylserine reduces cortisol response and may help people whose insomnia is driven by stress-related cortisol elevation.
What does not have strong evidence: valerian (inconsistent results across studies), most proprietary 'sleep blends' that combine 8-12 ingredients at sub-therapeutic doses, and CBD for insomnia specifically (though it has better evidence for anxiety). Always check supplement interactions with your medications using the medication copilot before adding any new supplement to your routine.
Sleep apnea is estimated to affect 22 million Americans, with 80% of cases going undiagnosed. It is not just a disease of overweight, middle-aged men who snore -- it affects people of all body types, and is significantly underdiagnosed in women, who often present atypically with symptoms like fatigue, insomnia, mood disturbances, and morning headaches rather than the 'classic' presentation of loud snoring and witnessed apneas. The National Heart, Lung, and Blood Institute's sleep apnea resource covers diagnosis criteria, risk factors, and treatment options in detail.
There are two main types. Obstructive sleep apnea (OSA) is caused by the throat muscles relaxing during sleep and blocking the airway, causing repeated micro-arousals (often without conscious awakening) that fragment sleep architecture. The result is that someone with untreated OSA can spend 8+ hours in bed and still be profoundly sleep-deprived because they never reach adequate deep sleep or REM sleep. Central sleep apnea is less common and involves the brain failing to send proper signals to breathing muscles -- it requires different treatment and is associated with heart failure and opioid use.
The gold-standard diagnostic test is polysomnography (an overnight sleep study), but home sleep apnea testing (HAST) has become widely available, less expensive, and accurate enough for diagnosing moderate to severe OSA. Many insurance plans now cover home sleep studies. The primary treatment for OSA is CPAP (continuous positive airway pressure) therapy, which is highly effective when tolerated -- most patients report dramatic improvements in energy, mood, and cognitive function within weeks of starting CPAP. For mild to moderate OSA, oral appliances (mandibular advancement devices) made by a dentist are an alternative for people who cannot tolerate CPAP. See also our resources for people with anxiety-related sleep disorders since untreated apnea frequently coexists with anxiety conditions.
If you snore, wake unrefreshed despite adequate sleep time, are told you stop breathing, experience morning headaches, or have a neck circumference greater than 17 inches (men) or 16 inches (women), a sleep apnea evaluation is warranted. The health copilot can help you complete the STOP-BANG screening questionnaire and decide whether to pursue a sleep study. Our blog post on fixing insomnia in 2026 also covers the role of undiagnosed sleep apnea in treatment-resistant insomnia.
The relationship between sleep and mental health is bidirectional and powerful. Poor sleep worsens anxiety and depression; anxiety and depression worsen sleep. For many people caught in this loop, it is impossible to tell which came first -- and it does not matter. What matters is breaking the cycle from both directions simultaneously.
From the sleep side, CBT-I is as effective for insomnia in people with depression and anxiety as it is for those without -- and treating insomnia in depressed or anxious individuals produces measurable improvements in their mental health symptoms, not just their sleep. Multiple studies have found that adding CBT-I to standard depression treatment produces better outcomes than standard treatment alone. This is powerful evidence that sleep is not just a symptom to be managed but an active treatment lever.
From the mental health side, anxiety management techniques -- particularly those targeting the hyperarousal state -- are directly helpful for insomnia. Mindfulness-based stress reduction (MBSR), acceptance and commitment therapy (ACT), and cognitive restructuring techniques borrowed from CBT all address the anxious thought patterns and nervous system activation that maintain insomnia. Diaphragmatic breathing and progressive muscle relaxation work by directly activating the parasympathetic nervous system, counteracting the fight-or-flight state that keeps people awake.
Medications deserve a specific note. Some antidepressants (trazodone, mirtazapine, amitriptyline) have sedating properties and are sometimes prescribed off-label for insomnia -- they can be appropriate for people whose insomnia co-occurs with depression or anxiety. Others (SSRIs, particularly fluoxetine and sertraline) can worsen insomnia, particularly at initiation, through their effects on serotonin and REM sleep. If you take an antidepressant and have noticed worsened sleep since starting it, discuss timing changes or alternatives with your prescriber. The mental health copilot can help you understand the complex relationship between your mental health and sleep and develop an integrated approach that addresses both.
Get AI Help Right Where You Browse
Use Copilotly's wellness copilot directly on any webpage. No tab switching.
Pick a copilot, ask your question, get professional-grade answers. 131 specialized AI copilots across 20 domains.