HOME / GUIDE / INSOMNIA
SLEEP & RECOVERY

Insomnia: how CBT-I works, step by step

PUBLISHED 2026-09-25 · OPERATOR 45
Short answer: Long-term insomnia is treated first with cognitive behavioural therapy for insomnia (CBT-I), not with pills. Sweden's 1177, the American College of Physicians, the American Academy of Sleep Medicine and the 2023 European guideline all agree on that. The working core is surprisingly concrete: a fixed wake-up time, a shorter sleep window that you extend week by week, and a bed that means sleep and nothing else. You will feel more tired for the first few weeks. After that, the time you lie awake in bed usually shrinks noticeably. Sleep hygiene tips on their own are rarely enough.

It is twenty to four. You have been awake for an hour. You work out how many hours are left before the alarm, then how many you have slept, then how tomorrow's meeting will go on that total. You know the counting makes it worse. You count anyway.

If this is one night a month, that is life. If it has been three nights a week since the spring, it is something else. And for that there is a treatment with better evidence behind it than most of what sits on the health shelf. It is also oddly little known, because you cannot buy it at the pharmacy.

This guide is about that treatment: what it is made of, why it works and what it looks like week by week. What changes in your sleep with age is covered in the guide to sleeping better after 40. Why you wake in the middle of the night is covered in the guide to waking up at 3am. This page is about what to do once bad nights have become a pattern.

A bad week, or insomnia?

Everyone sleeps badly sometimes. Sweden's national health information service 1177 is clear that after a bad night, sleep usually goes back to normal on its own. What turns insomnia into a problem is that it repeats night after night and that you function worse during the day. 1177 lists signs including these:

Time matters too. The NHS calls insomnia that has lasted less than 3 months short-term, and insomnia that has lasted 3 months or longer long-term. The research below is about the long-term kind. The studies have generally required symptoms on at least three nights a week.

How common is it? In a widely cited review of more than fifty population studies, Ohayon (2002) found that about a third of adults have at least one insomnia symptom. Counting only those who meet the criteria for a diagnosis, the figure is around 6%. One detail is worth noting if you are in midlife: symptoms become more common with age, but according to the same review the rate of diagnosed insomnia varies little with age.

Small children do not count: if a three-year-old wakes you three times a night, that is not insomnia. That is a rota. The treatment below assumes that it is your own sleep misbehaving when you actually have the chance to sleep.

Why it gets stuck: what you do to cope

The model still used to explain long-term insomnia was described by Spielman and colleagues in 1987. It is often called the 3P model, and it splits the causes into three layers:

LayerWhat it isExamples
PredisposingWhat you bring with youA tendency to worry, a naturally light sleeper
PrecipitatingWhat set it offA reorganisation at work, illness, a break-up, a newborn
PerpetuatingWhat keeps it goingMore time in bed, lie-ins, naps, dreading the night

The uncomfortable point is in the third row. The trigger often goes away. The reorganisation ends, the baby starts sleeping. But the insomnia stays, because what you did to get through the hard stretch has become a habit: you go to bed earlier to "catch up", stay in bed longer in the morning, sleep for a while in the afternoon. All of that makes sense. All of it spreads your sleep across more hours in bed and makes it thinner.

That is why the treatment targets the third row, not the first.

A note on the model: the 3P model is a way of understanding the pattern, not a measuring tool. It explains why the treatment looks the way it does. It cannot tell you exactly what is keeping your own insomnia going.

Why sleep tips alone are not enough

Dark bedroom, no coffee in the afternoon, screens off an hour before bed. That advice is called sleep hygiene. It is correct. It is also what most people have already tried by the time they ask for help.

The American Academy of Sleep Medicine (AASM) reviewed the evidence for its 2021 guideline. Its recommendation on sleep hygiene is clear, though conditional: it suggests that sleep hygiene should not be used as the only treatment for long-term insomnia. That is not a rejection of the advice. It is a statement that the advice is not enough on its own as a treatment.

The clearest evidence comes from the British HABIT trial, published in The Lancet in 2023. It randomly assigned 642 adults with insomnia from 35 general practices in England to two groups. The average age was 55. Both groups got the same sleep hygiene booklet. One group also got four short sessions with a practice nurse, two at the surgery and two by phone, who helped them carry out sleep restriction, the method described further down. The outcome was measured with the Insomnia Severity Index, a scale from 0 to 28 where lower is better:

GroupScore at 6 months
Sleep hygiene only13.9
Sleep hygiene + sleep restriction10.9

The adjusted difference was 3.05 points, a large effect in statistical terms (Cohen's d 0.74). It was already there at 3 months and still there at 12. The same number of people in each group, eight, had serious adverse events during the trial, and none were judged to be related to the treatment. The interesting part is what separated the groups. It was not knowledge. Both had the same booklet. It was that someone helped them change the hours they spent in bed.

What CBT-I actually is

CBT for insomnia, usually shortened to CBT-I, is not talking therapy in general. It is a package of specific techniques. In the large review by Trauer and colleagues in Annals of Internal Medicine (2015), a treatment counted as CBT-I if it included at least three of these five parts:

The review covered 20 randomised trials with 1,162 participants, average age 56. This is how much sleep changed in the participants' sleep diaries after treatment, compared with control groups:

MeasureChange
Time to fall asleep19 minutes shorter
Time awake after falling asleep26 minutes shorter
Total sleep time8 minutes longer, not statistically significant
Sleep efficiency10 percentage points higher

Read the table carefully, because it says something most people do not expect. Total sleep time barely changed straight after treatment. What changed was the time spent awake: less time falling asleep, less time awake in the middle of the night. Sleep got denser, not longer. For many people with insomnia that is exactly the part that hurts, the hours of lying awake in the dark. According to the review, the changes seemed to hold at later follow-ups. 1177 says the same: the effect of the treatment usually lasts a long time.

The guidelines agree. Since 2016 the American College of Physicians has recommended CBT-I as the first treatment for all adults with long-term insomnia. In 2021 the AASM gave multicomponent CBT-I a strong recommendation. The 2023 European guideline recommends CBT-I as the first-line treatment for adults of any age, including people with other conditions at the same time, whether it is delivered in person or digitally.

Sleep restriction: how to work out your sleep window

This is one of the most central and most misunderstood parts of the treatment. Spielman and colleagues described the method back in 1987, and it rests on a simple observation: if you spend eight hours in bed to get six hours of sleep, you get six hours spread over eight, full of holes. Sleep restriction turns that around. At first you only get as much time in bed as you actually sleep now. Sleep pressure builds and your sleep consolidates. Then you extend the time as your sleep fills it.

The protocol below is the one used in Kyle's 2014 laboratory study in the journal Sleep. Variations exist, but the steps are broadly the same across the literature.

  1. Keep a sleep diary for a week. Every morning: when you went to bed, roughly how long it took to fall asleep, how long you were awake in the night, when you got up. Estimate. Do not look at the clock during the night.
  2. Work out your average sleep time. Time in bed minus time awake, averaged over the week.
  3. Set your sleep window to that sleep time, but never below five hours. Five hours was the floor in Kyle's study. Some clinicians use four and a half, but the authors themselves point out that a lower floor may cause more sleepiness than they measured.
  4. Pick a fixed wake-up time. The same time all seven days, even after a bad night. Your bedtime is counted backwards from it.
  5. Review once a week using sleep efficiency: time asleep divided by time in bed, times 100.
    • 90% or more: extend the window by 15 minutes.
    • 85 to 89%: keep the window.
    • Under 85%: shorten the window by 15 minutes, but not below the floor.

A worked example

The numbers below are made up to show the arithmetic, not taken from a study. The wake-up time is fixed at 06:00. In the week before treatment, this person spent an average of 8 hours in bed (22:00 to 06:00) but slept an average of 5 hours 45 minutes. That is a sleep efficiency of 72% and 2 hours 15 minutes awake in bed each night.

WeekWindowBedtimeAvg sleepEfficiencyNext week
15 h 45 min00:155 h 00 min87%Keep
25 h 45 min00:155 h 15 min91%+15 min
36 h 00 min00:005 h 30 min92%+15 min
46 h 15 min23:455 h 30 min88%Keep
56 h 15 min23:455 h 50 min93%+15 min

Two things in the table are deliberate and worth seeing. First: in weeks 1 to 4 the person sleeps less than before treatment. That is not failure. It is exactly what Kyle measured in the lab, and it is why the first weeks are hard. Second: in week 5 the person sleeps about as long as before treatment, but lies awake in bed for 25 minutes a night instead of 2 hours 15 minutes. That is the same pattern as in Trauer's table above. The sleep has not got longer yet. It has got denser.

The price: you get more tired before you get less tired

This is the part that is often left out, and it is the reason sleep restriction is best done with support. Kyle and colleagues measured sleep with EEG in the lab in 16 people with insomnia during the first four weeks. Compared with before treatment, they slept on average 91 minutes less on night 1, 78 minutes less on night 8 and 69 minutes less on night 22. Their daytime sleepiness rose in weeks 1 to 3. Their reaction times got measurably worse. By three months, both sleepiness and reaction times were back at baseline, while their insomnia had clearly improved.

In an earlier study by the same research group, more than a third of the participants who kept audio diaries said their driving was affected during treatment. Do not drive or use dangerous machinery when you feel sleepy. Plan the first weeks so you can take the bus, walk or let someone else drive. Do not cycle in traffic when you feel sleepy.

When not to do it on your own

Sleep restriction deliberately increases sleep loss for a while. That is why it is not suitable for everyone without clinical support. The HABIT trial excluded, among others, people with epilepsy, bipolar disorder or schizophrenia, people with another sleep disorder such as sleep apnoea, restless legs or narcolepsy, pregnant women, people with dementia or mild cognitive impairment, people with current suicidal thoughts or a suicide attempt in the past two months, and people working nights, evenings, early mornings or rotating shifts. The stated reason was that the method may be unsuitable or ineffective for them.

If any of this applies to you, if you are already very sleepy during the day, or if you have a job where tiredness is a safety risk, such as professional driving: do not do sleep restriction on your own. Raise it with your doctor, who can adapt the treatment.

Stimulus control: the bed should mean sleep

The second behavioural part is easier to explain and harder to do at three in the morning. The idea is that your brain learns what the bed is for. Lie awake in it for hours and your brain learns that the bed is the place where you are awake and worrying.

1177's own advice follows the same principle:

The quarter-of-an-hour rule is not about timing yourself. Do not look at the clock to know when fifteen minutes have passed. Go by feel: when you notice you are lying there fighting rather than drifting, it is time to get up.

The AASM's 2021 guideline gives stimulus control and sleep restriction each a conditional recommendation as a stand-alone treatment. Combined in a package with the cognitive parts, the recommendation is strong.

Your thoughts about sleep

The cognitive part targets what goes on in your head at twenty to four: the counting, the catastrophising about tomorrow, the belief that one bad night ruins the whole day. The work is to test those thoughts against how the days actually went. Most people with insomnia have got through far more days after bad nights than they believe in the middle of the night.

One practical step 1177 mentions is to write down what happened during the day, or what you need to remember for tomorrow, before you go to bed. The worry gets a place on paper instead of in bed. More on calming your body down, with three exercises described properly, is in the guide to breathing exercises for stress. If stress is what keeps you awake, there is more in the guide to stress management.

Exercise helps, but it is not the treatment

1177 says regular physical activity often helps you sleep better, and that outdoor activity during the day has the best effect on sleep. The 2023 European guideline is more cautious: light therapy and exercise may be useful as add-ons to CBT-I.

The key word is add-on. Someone who has slept badly for six months rarely fixes it by taking up running. But exercise fits unusually well with sleep restriction, because it gives you something to do with your tiredness other than lying down. A morning walk in daylight is especially useful, since it combines movement and light at the same fixed wake-up time. When in the day a harder session fits best is covered in the guide to exercise and sleep.

Sleeping pills and melatonin

1177 says sleep medication should only be used for short periods and at the lowest possible dose, that it does not give long-term results, and that some of it can cause dependence. The 2023 European guideline says medication can be offered when CBT-I has not been enough. According to the guideline, several of the common sleeping medicines are mainly for short-term treatment of up to four weeks, although longer use may be considered in some cases.

The same guideline advises against several things that are easy to get hold of, including antihistamines, fast-release melatonin and herbal remedies. Prolonged-release melatonin can, according to the guideline, be used for up to three months by people aged 55 and over. What over-the-counter melatonin is approved for in Sweden is covered in the sleep guide.

Pills and CBT-I do not rule each other out. If you take sleep medication today, do not stop on your own. Talk to the doctor who prescribed it.

Where to get CBT-I

The European guideline recommends CBT-I whether it is delivered in person or digitally. That does not mean every app and programme is equally good. Choose one that your health service offers or refers you to.

How to do it: five weeks in an ordinary life

This is what a plan can look like if you want to start, together with your doctor if anything in the list above applies to you.

When to seek medical advice

1177 says you should seek help if your sleep problems do not improve despite changes you have made to sleep better, and that the earlier you get help, the easier it is to feel well again. Contact your GP if any of these apply:

Call 112 (999 in the UK, 911 in the US) or go to an emergency department if you are having thoughts of ending your life. In the UK you can also call Samaritans on 116 123, and in the US you can call or text 988.

This page gives general health information. It does not replace an assessment by a healthcare professional. It does not diagnose.

Frequently asked questions

What is the difference between poor sleep and insomnia?

Everyone has bad nights, and afterwards sleep usually returns to normal on its own. Insomnia is when the problems repeat night after night and you function worse during the day. The NHS calls insomnia that has lasted 3 months or longer long-term. That is the kind CBT-I was developed for.

What is CBT-I?

A package of specific techniques, not talking therapy in general. The most common parts are sleep restriction, stimulus control, cognitive therapy for your thoughts about sleep, sleep hygiene and relaxation. Sweden's 1177, the American College of Physicians and the 2023 European guideline recommend CBT-I as the first-line treatment for long-term insomnia, and the American Academy of Sleep Medicine gives it its strongest recommendation.

How do I work out my sleep window?

Keep a sleep diary for a week and work out how long you actually sleep on average. Set your sleep window to that time, but never below five hours. Pick a fixed wake-up time and count your bedtime backwards from it. Review every week using sleep efficiency, which is time asleep divided by time in bed: 90% or more means 15 minutes longer, 85 to 89% means no change, and under 85% means 15 minutes shorter. If you have epilepsy, bipolar disorder, schizophrenia, another sleep disorder or suicidal thoughts, are pregnant, work shifts, are already very sleepy during the day, or have a job where tiredness is a safety risk, do it with clinical support.

Does sleep restriction make you more tired?

Yes, at first. In Kyle's 2014 laboratory study, participants slept between 69 and 91 minutes less than before treatment during the first weeks, and their daytime sleepiness rose in weeks 1 to 3. By three months, sleepiness was back at baseline while their insomnia had clearly improved. Do not drive when you feel sleepy.

Is sleep hygiene enough?

Rarely. The AASM suggests that sleep hygiene should not be used as the only treatment for long-term insomnia. In the HABIT trial of 642 people, both groups got the same sleep hygiene booklet, but the group that also got help with sleep restriction had clearly lower insomnia scores at six months, 10.9 against 13.9.

Do sleeping pills help with insomnia?

They can help in the short term, but 1177 says they should only be used for short periods and at the lowest possible dose, that they do not give long-term results, and that some can cause dependence. The European guideline places medication after CBT-I. Never stop prescribed sleep medication on your own without talking to your doctor.

Sources for this page: 1177 on sleep difficulties for the signs of insomnia, the stimulus control advice, its position on CBT and medication, and where to seek help; the NHS on insomnia for the three-month threshold; Ohayon 2002 in Sleep Medicine Reviews (PMID 12531146) for prevalence; Spielman, Caruso and Glovinsky 1987 in Psychiatric Clinics of North America (PMID 3332317) for the 3P model; Spielman, Saskin and Thorpy 1987 in Sleep (PMID 3563247) for the origin of sleep restriction; Trauer and colleagues 2015 in Annals of Internal Medicine (PMID 26054060) for the effect sizes; Qaseem and colleagues 2016 in Annals of Internal Medicine (PMID 27136449) for the ACP guideline; Edinger and colleagues 2021 in the Journal of Clinical Sleep Medicine (PMID 33164742) for the AASM guideline; Riemann and colleagues 2023 in the Journal of Sleep Research (PMID 38016484) for the European guideline; Kyle and colleagues 2014 in Sleep (PMID 24497651) for the protocol and daytime sleepiness; Kyle and colleagues 2011 in Sleep Medicine (PMID 21907616) for participants' accounts of driving; Kyle and colleagues 2023 in The Lancet (PMID 37573859) and the trial protocol in BMJ Open 2020 (PMID 32139496) for the HABIT trial.

Want someone to do the Sunday maths with you?

Operator 45 builds a personal coach out of your answers: one that sees your sleep, your training and your energy together and helps you stick with what actually works. 7 days free, then 99 kr/month or 799 kr/year.

Start free →