Insomnia: How to Fight It and When You Need a Doctor

Insomnia: How to Fight It and When You Need a Doctor

Three in the morning. You're counting the hours until the alarm, tossing and turning, staring at the ceiling. Sound familiar? By expert estimates, one in ten adults deals with insomnia, and roughly a third experience some kind of sleep problem.

The good news is that insomnia is treatable — and not with pills. Psychotherapy, not sleeping medication, is considered the first-line method: it works as well as drugs, but the effect persists after the course ends. In this article: why sleep disappears, what to fix first, what's known about pharmacy remedies, and when you can't do without a doctor.

This article is for informational purposes only: it doesn't diagnose anything and doesn't replace a consultation with a doctor. Before taking any medication, read the instructions, and if in doubt — check with a doctor or pharmacist.

In brief: the essentials about insomnia

  • Get up at the same time every day, even on weekends and after a bad night. This is the golden rule
  • Go to bed only when you're sleepy. Not asleep within 10–15 minutes — get up and do something quiet in dim light
  • Cut out caffeine and alcohol in the second half of the day: caffeine keeps you alert for 6–8 hours, alcohol fragments sleep
  • The first-line method is cognitive behavioral therapy. It restores sleep without medication, and the effect lasts after the course
  • Over-the-counter remedies help for a week or two and don't cure. Most prescription sleeping pills cause tolerance
  • See a doctor if you can't sleep three or more nights a week for longer than three months, or if you snore with pauses in breathing and feel drowsy behind the wheel

What counts as insomnia

Insomnia isn't "one bad night." It's diagnosed when the problems recur regularly and interfere with your day:

  • trouble falling asleep;
  • nighttime awakenings followed by a long struggle to get back to sleep;
  • waking up too early;
  • you sleep, but don't feel rested;
  • during the day — fatigue, irritability, trouble concentrating.

Short-term insomnia lasts less than three months. There's usually an obvious trigger: stress, illness, shift work, a long flight. Chronic insomnia is three months or longer. This kind rarely resolves on its own: habits and thoughts step in that keep the insomnia going even after the original cause is gone.

One sleepless night isn't a reason to worry, but the habit of "not sleeping" forms quickly: within a few weeks the bed starts to be associated with wakefulness and anxiety.

The four faces of insomnia and its two types by duration
The four faces of insomnia and its two types by duration

How healthy sleep works: sleep pressure and the internal clock

To understand why some habits hurt sleep and others help it, you only need to know two mechanisms.

The first is sleep pressure. From the moment you wake up, a substance that causes sleepiness builds up in your body. The longer you stay awake, the stronger the urge to sleep. A daytime nap "resets" this counter, which is why it's harder to fall asleep at night after a long nap. Caffeine doesn't remove sleepiness — it blocks your perception of it: the substance keeps accumulating, but the brain doesn't know it.

The second is the internal clock. It tells the body when it's day and when it's night. Light, especially morning light, sets the clock and helps you fall asleep on time. Evening light from lamps and screens pushes the clock back — sleepiness arrives later. In the morning you get up with the alarm again, undersleep, and the cycle closes.

A "second wind" often comes before bed: an hour or two before your usual lights-out, alertness rises. This is normal. Going to bed at that moment is pointless — better to wait for real sleepiness.

The two mechanisms of sleep: sleep pressure and the internal clock
The two mechanisms of sleep: sleep pressure and the internal clock

Sleep hygiene: what to fix first

On their own, these rules rarely cure long-standing insomnia, but without them nothing else works.

  • Get up at the same time, on weekends too. Wake-up time matters more than bedtime: it's what sets the internal clock. Slept badly — get up anyway, and skip the "catch-up sleep"
  • Go to bed only when sleepy. The bed is for sleep, not for TV shows, food, or work. Not asleep within 10–15 minutes — get up, go to another room, and do something calm in dim light. Return when drowsiness pulls you back
  • Caffeine — in the first half of the day. A cup of coffee acts for 6–8 hours, so the last one no later than 2–3 p.m. Caffeine isn't only in coffee: it's tea, cola, energy drinks, chocolate, and some cold and pain remedies
  • Alcohol is not a sleeping aid. It helps you fall asleep, but in the second half of the night it fragments sleep and makes it shallow
  • Nicotine is a stimulant too. For a heavy smoker, the habit itself also disrupts sleep: at night the body demands its next dose
  • Don't nap during the day. A short daytime nap won't harm a healthy person, but with insomnia it reduces sleep pressure. If a nap is unavoidable — no more than 20–30 minutes and before three in the afternoon
  • Move during the day. Regular activity improves sleep, but finish intense workouts a few hours before lights-out
  • Prepare for sleep in advance. The hour before bed — no work, news, or arguments: a warm shower, a book, quiet music
  • Keep screens out of bed. Phones and laptops both stimulate with light and draw you in. Adopt the rule "charge the phone away from the bed"
  • Set up the bedroom: cool, dark, and quiet. Blackout curtains, a sleep mask, and earplugs do more than an expensive mattress
  • Don't overeat at night. A heavy late dinner makes it hard to fall asleep; a light snack doesn't

Most sleep advice comes down to one thought: don't interfere with your body doing what it's prepared to do on its own. Quite often that's enough for insomnia to retreat.

Sleep hygiene: what helps and what hinders
Sleep hygiene: what helps and what hinders

What to do when you can't sleep right now

  • Don't look at the clock. Counting "only three hours of sleep left" only fuels anxiety. Turn the alarm face-down or move it off the nightstand
  • Don't force yourself to lie in bed. After 10–15 minutes of fruitless attempts, get up. The longer you "try to fall asleep," the more firmly the bed becomes linked with wakefulness
  • Do something calm in dim light: read a paper book, flip through an album, fold laundry. The goal isn't to fall asleep there, but to wait for sleepiness
  • Breathing with a long exhale: inhale for a count of 4, exhale for 6, about six breaths per minute. A slow exhale switches on calm mode; the same technique helps with anxiety, which we cover in a separate article
  • Muscle relaxation: tense and relax muscles one by one, from feet to face. This is one of the components of the therapy described below
  • Write your worries down. If tasks and worries keep circling in your head, make a "for tomorrow" list: it'll be easier for the brain to let them go until morning

If it doesn't work for a night or two — that's not insomnia yet. But if it repeats for weeks, you need treatment, not a battle.

Psychotherapy: the first-line treatment

Cognitive behavioral therapy for insomnia is considered first-line in clinical guidelines. Unlike sleeping pills, it doesn't induce sleep chemically: it removes the habits and thoughts that break it. The effect is comparable to medication, but it persists after the course ends.

What the therapy includes:

  • A sleep diary. For two weeks, record when you went to bed, when you fell asleep, how many times you woke up. It shows how much you actually sleep and where sleep gets lost
  • Stimulus control. Bed only for sleep; go to bed only when sleepy; get up after 10–15 minutes without sleep; no daytime napping. This way the bed becomes a signal for sleep again, not for anxiety
  • Sleep restriction. Time in bed is cut down to what you actually sleep, but no less than 5–6 hours. Sleep pressure builds, falling asleep becomes faster and deeper, then time in bed is gradually returned. The method is effective but requires a specialist: sleep deprivation is dangerous with epilepsy, bipolar disorder, and depression
  • Working with thoughts. "I can't function without eight hours," "I'll never fall asleep" — thoughts like these sustain insomnia by themselves. The therapist teaches you to notice them and replace them with realistic ones: one bad night is not a catastrophe
  • Relaxation: breathing, muscle relaxation, meditation
  • Sleep hygiene — what we covered above

The course usually takes four to eight sessions with a specialist. There are also apps with the same program: studies show they work too. With long-standing insomnia, it's better to start with a specialist anyway and use an app as support.

A sleeping pill solves the problem for one night; therapy solves it for years. That's why therapy comes first, and medication is added only when necessary.

The five components of insomnia therapy
The five components of insomnia therapy

Pharmacy remedies: what's known

The "for sleep" shelf is huge. Let's go through it by category — based on what research shows.

Melatonin. It's a hormone produced in the brain in darkness that tells the body night has come. In tablet form it isn't a sleeping pill in the usual sense: it doesn't knock you out, it shifts the internal clock.

  • For ordinary insomnia the effect is modest: on average, you fall asleep a few minutes earlier
  • Melatonin works best when the internal clock is off: after flights across several time zones, and in night owls with a delayed schedule
  • Small doses suffice for this — 0.5 to 3 mg. Take it 1–2 hours before lights-out, and for jet lag — in the evening before bed in the new time zone. More is not better: the side effects are the same and the benefit doesn't grow
  • Headache, dizziness, and daytime drowsiness are possible. Data on long-term use is limited, so it's meant for a short course
  • Melatonin supplements don't always contain what the label says: studies have found the actual content can differ from the stated amount severalfold, and some supplements have been found to contain foreign substances. So choose pharmacy-grade products, not supplements of dubious origin

Antihistamines (diphenhydramine, doxylamine) — what's usually sold as over-the-counter sleep aids. They help you fall asleep for a night or two, but:

  • tolerance develops within days, and they stop working
  • they cause dry mouth, constipation, urinary retention, and morning drowsiness that makes driving unsafe
  • in the elderly they cause confusion and falls, so they're contraindicated

This kind of product is an occasional option for a night or two, not a treatment for insomnia.

Herbal remedies — valerian, motherwort, passionflower, lemon balm, hops, lavender. The evidence of benefit is weak or contradictory: most studies lack quality, and some remedies have documented side effects. They're safer than antihistamines, but don't count on them as treatment.

Magnesium and glycine. The evidence for insomnia is weak. Tryptophan and its derivatives don't mix with antidepressants: that combination is dangerous.

Drops with phenobarbital. A barbiturate that causes dependence and, combined with alcohol and other sedatives, suppresses breathing. Not an option for sleep.

If you need a pharmacy remedy for longer than two weeks, it isn't solving the problem. Time to deal with the cause instead of switching packaging.

Insomnia remedies: what works and what doesn't
Insomnia remedies: what works and what doesn't

Prescription sleeping pills

A doctor may prescribe a sleeping pill if the insomnia is severe and other methods haven't helped. The guidelines agree on one thing: a short course, a few days or weeks, and together with psychotherapy, not instead of it.

  • Z-drugs (zopiclone, zolpidem) and benzodiazepines — the best known. They're effective, but they cause tolerance and dependence, and after abrupt discontinuation insomnia comes back with a vengeance. Daytime drowsiness, memory lapses, and falls are possible — especially in the elderly
  • Newer-class drugs (orexin blockers, melatonin receptor agonists) carry less risk of dependence, but they're still prescription-only and should be chosen by a doctor
  • Some antidepressants in low doses help with sleep, especially when insomnia comes with anxiety or depression. A doctor prescribes them
  • IV drips and "vascular" drugs have no proven benefit for insomnia

What you must not do: combine sleeping pills with alcohol, increase the dose on your own, or stop abruptly. These drugs are tapered off gradually, on a doctor's schedule.

If you've been taking a sleeping pill for more than a few weeks, tell your doctor: the regimen can be revised so you can come off the drug without the insomnia returning.

Special cases

Jet lag. After a flight across several time zones, the internal clock is off; adaptation takes roughly one day per time zone. Light and schedule help: during the day — bright light and walks, at night — darkness, with meals and activity timed to the new location. Melatonin before bed in the new time zone speeds up adaptation.

Shift work. A night schedule is a trial for the body. What helps: a short 20–30 minute nap before the night shift, bright light during work, dark sunglasses on the way home, heavy curtains, earplugs, and the phone off for daytime sleep. An "anchor" sleep helps too — the hours you always sleep, whatever the schedule. Sleeping pills on a shift schedule — only as prescribed by a doctor.

Night owls. If sleepiness comes toward morning but you have to get up early, you may have delayed sleep phase. Morning bright light right after waking, less light in the evening, and a consistent wake-up time help. Low-dose melatonin also shifts the clock the right way, but a doctor should choose the timing.

Pregnancy. In the third trimester, the belly, heartburn, and frequent nighttime bathroom trips get in the way of sleep. What helps: sleeping on the left side with a pillow between the knees and under the belly, an elevated head of the bed for heartburn, a cool room. Sleep medications and melatonin during pregnancy — only as agreed with a doctor.

Menopause. Hot flashes wake you several times a night. A cool bedroom and light layered bedding help, and with frequent hot flashes — a gynecologist.

Older age. With age, sleep becomes shorter and shallower: it's the norm, not a disease. Less time in bed, daylight and activity, and no antihistamine sleep aids help. Have your doctor review your medications: evening diuretics and some blood pressure drugs cause nighttime awakenings.

Teenagers. In adolescence the internal clock shifts: sleepiness comes later, but school starts early. A teenager needs 8–10 hours of sleep. Morning bright light, fewer screens in the evening, and the same schedule on weekdays and weekends help.

Restless legs. If you feel an urge to move your legs in the evening and at night, and movement brings relief, that's restless legs syndrome. It's often linked to iron deficiency; the signs of deficiency and what to do about it were covered in the article "Iron deficiency".

Snoring. Loud snoring with pauses in breathing is a sign of sleep apnea. Insomnia and apnea often go together, and both need treating. Many sleeping pills are contraindicated with apnea, so a doctor should choose them.

When you need a doctor

See a primary care doctor, neurologist, or sleep specialist — soon, if:

  • sleep problems recur three or more nights a week for longer than three months
  • changing habits hasn't helped within a month
  • insomnia interferes with work and mood, you're barely coping
  • there's snoring with pauses in breathing, morning headaches, daytime drowsiness
  • an urge to move your legs in the evening and at night
  • there are signs of depression or anxiety: low mood, loss of interest, constant worry
  • you've been taking sleeping pills for more than a few weeks and can't stop
  • the insomnia started after a new medication

Urgently, if:

  • you fall asleep during the day at the worst moments: behind the wheel, mid-conversation, during a meal
  • muscles suddenly go weak with laughter or strong emotion
  • your body freezes for a few seconds as you fall asleep or wake up, and the visions seem too real

Drowsiness behind the wheel is as dangerous as alcohol. If you haven't slept, don't drive.

When insomnia requires a doctor
When insomnia requires a doctor

The sleep diary and trackers

The sleep diary is the main tool both for self-help and for the doctor. For two weeks, note what time you went to bed, how long it took to fall asleep, how many times you woke up, when you got up, how much caffeine and alcohol you had, and whether you napped. Often at this stage alone it's clear where sleep is being lost.

Fitness bracelets and apps track sleep by movement and heart rate. This tracking can't be called accurate: a bracelet can mistake quiet wakefulness for sleep, and restless sleep for insomnia. Rely on general trends, not the "72% sleep efficiency" number: constant tracking only fuels anxiety. A diagnosis is made by a doctor based on an exam and, if needed, an in-clinic sleep study.

Frequently asked questions

How much sleep do I need?

For an adult, 7–9 hours on average. The norm is individual. The benchmark is simple: if you're alert during the day and don't need a cup of coffee to think straight, you're getting enough sleep.

Does melatonin help?

For ordinary insomnia, only slightly. It works more noticeably for jet lag and a delayed schedule. The dose needs to be small and the course short.

Can you catch up on sleep on weekends?

Partially. But sleeping in shifts the internal clock, and on Sunday evening falling asleep is even harder. It's more reliable to get up at the same time and, when tired, go to bed earlier.

Which matters more: bedtime or wake-up time?

Wake-up time: that's what sets the internal clock. Let sleepiness govern bedtime.

Can sleeping pills be taken long-term?

No. Tolerance, dependence, and insomnia returning after withdrawal are the reasons sleeping pills are prescribed in short courses. Long-term treatment is psychotherapy.

Do valerian and motherwort help?

The evidence is weak. They usually do little harm, but they aren't a treatment either.

Should I count how many hours of sleep are left?

No: it fuels anxiety and keeps you awake. Keep clocks out of sight.

Do a sleep mask and earplugs help?

Yes. Darkness and silence are basic conditions for sleep, and in a noisy apartment they're among the most effective solutions.

Instead of a conclusion

Insomnia isn't a verdict or a "weak character" — it's a treatable condition. What to remember:

  • Getting up at the same time daily and going to bed only when sleepy — that's the foundation
  • Caffeine and alcohol in the second half of the day — sleep's main enemies
  • The first-line treatment is psychotherapy; sleeping pills — short course, as prescribed
  • Snoring with pauses in breathing, drowsiness behind the wheel, three months without sleep — reasons to see a doctor

Related reading:

If a doctor has prescribed a course of medication — for insomnia, anxiety, or anything else — Tabletto (tabletto.online) makes it easy to keep tabs on your stock and expiration dates. And leftover sleeping pills from past courses shouldn't be kept at all: they're taken only as prescribed.

Disclaimer. This article is for informational purposes and doesn't replace a consultation with a doctor or pharmacist. Choose the medication, dosage, and duration of use according to the instructions, and when in doubt — together with a specialist. This is especially important when the patient is a child, a pregnant woman, or someone with chronic conditions.