How to Cite This Chapter: Kates N. Insomnia. McMaster Textbook of Internal Medicine. Kraków: Medycyna Praktyczna. Accessed May 22, 2024.
Last Updated: September 10, 2021
Last Reviewed: September 10, 2021
Chapter Information


Insomnia is defined as inadequate or poor sleep quality, difficulty falling asleep, frequent nocturnal awakenings, early morning awakening, and being unable to get back to sleep. The common result of insomnia is that someone feels unrefreshed on the following day, with daytime fatigue and drowsiness. It is often accompanied by deficits in functioning and performance—especially in the case of tasks requiring concentration, attention, memory, or precision—which the person may not recognize or acknowledge.


Almost 45% of adults report not getting enough sleep, while 10% to 15% report chronic insomnia, and 40%, daytime drowsiness. This has significant consequences. Inadequate sleep is associated with an increased risk of diabetes, obesity, gastrointestinal problems, especially reflux, cardiovascular disease, memory impairment, mood changes as well as inattention and a slower reaction time. For example, driving after not sleeping for 18 hours can lead to a level of impairment that is equivalent to having had 3 to 4 alcoholic drinks, or equivalent to having a blood alcohol content of 0.05%; being awake for at least 24 hours is equal to having a blood alcohol content of 0.10%. In addition, 51% of adults report driving when drowsy, and 17% of drivers report having dozing off at the wheel on ≥1 occasion. Furthermore, 27% of Canadians report being sleepy at work ≥2 days a week, and 19% report making errors at work because of sleeplessness, with 2% reporting being injured. This is apart from hypnotic drug dependence, which can also contribute to daytime sleepiness and sedation.

Physiology of the Sleep CycleTop

The sleep cycle lasts ~90 minutes and repeats itself throughout the night. There are 5 major stages of the sleep cycle. Stages 1 and 2 are times of lighter sleep, with faster brain waves. Stages 3 and 4 are characterized by deep, slow-wave sleep and are the most physically restorative. Rapid eye movement (REM) sleep is the final stage at which we dream and takes up ~25% of the sleep cycle. A lack of REM sleep affects cognitive functioning, memory integration, insight, and problem solving. As the night progresses, the amount of stage 3 and 4 sleep decreases, and the amount of REM sleep increases.

Although there is a great individual variation, on average we need 7 to 9 hours of sleep at night, with 6 hours being the minimum for various physiologic and restorative processes to occur successfully and for an individual to be able to function optimally the following day. The need for sleep changes with age. Newborns sleep for as many as 18 hours a day, although by the age of 12 months, this is decreased to 13 to 15 hours, and teens need ~9 hours of sleep. The amount of REM sleep also decreases from 50% in a newborn to 25% in an adult.

Sleep is controlled by 2 processes. In the first one, adenosine—which promotes sleep—plays a key role. Adenosine levels gradually increase during the day, eventually inducing sleep, but are reduced by sleep, including napping, which can impair sleep at night. Caffeine blocks adenosine receptors, making it harder to fall asleep in addition to its effect of briefly counteracting the feeling of sleepiness. The second process is related to circadian rhythm changes, which are linked to the biologic clock and melatonin production. Melatonin influences the sleep-wake cycle, and its concentration increases during the evening in response to decreasing amounts of daylight to promote the onset of sleep. It then decreases gradually during the day before rising again in the evening. Ideally, adenosine and melatonin levels reach their peak at about the same time.


Insomnia can be primary or secondary:

1. Primary insomnia is usually caused by psychologic factors, stress or major life events, or poor sleep hygiene, or in some instances it may be idiopathic. It can be transient (<1 month), short-term (≤6 months), or long-term (>6 months). While the commonest sleep problem is interrupted nocturnal sleep, there are a number of other primary sleep problems that can cause sleeplessness, including:

1) Sleep apnea may affect up to 3.5% of adults. It is more prevalent in males and individuals who are obese, aged >50 years, or have a family history of this disease. Up to 2% of children may experience sleep apnea, usually manifested by snoring, but this is usually treated with tonsillectomy, or children just grow out of it.

2) Restless leg syndrome (RLS) is a neurologic movement disorder leading to interrupted nocturnal sleep and excessive daytime sleepiness. RLS can be genetic in 4% to 14% of cases.

2. Secondary insomnia is often multifactorial and usually caused by medications, substances, or medical conditions, including psychiatric disorders, which need to be addressed or treated. Common substances associated with insomnia are alcohol, caffeine, chocolate, tobacco, substances produced by a nicotine patch, beta-blockers, calcium channel blockers, bronchodilators, and psychostimulants. Common drugs and medical conditions associated with insomnia see Table 1.


The diagnostic assessment of a patient with insomnia has 4 steps:

1. Asking screening questions that can help detect a sleep problem: The following 3 questions can easily be incorporated into the assessment of any health problem, but especially if someone identifies problems with their sleep:

1) Are you content with your sleep and do you feel refreshed on waking up?

2) Are you excessively sleepy during the day? This may also identify possible obstructive sleep apnea (OSA) (see Obstructive Sleep Apnea).

3) Does your bed partner (or parent) complain about your sleep? This may also identify possible sleep apnea or RLS.

2. Investigating sleep habits and behaviors: In this step factors that can affect patients’ sleep are examined. The following questions can be used to assess an adult’s sleep habits and behaviors before going to bed, in the bedroom, and if someone wakes:

1) What do you do before you go to bed, once you are in bed before you go to sleep, or if you wake during the night?

2) How much sleep do you usually get; how often do you wake; how long do these sleepless periods last; and what do you do if you cannot sleep?

3) How would you rate the quality of your sleep and how refreshed you feel in the morning?

4) Can you describe your sleep environment and activities that you perform in your bedroom other than sleep and having sexual contacts?

5) Do you have any routines or activities that you perform on a regular basis every evening before preparing for sleep?

The last 2 questions are important, as they may suggest possible interventions that could address these problems. It can be helpful to get a clear picture of how an individual sleeps and what they do in the period before preparing for bed. The best way to do this is by asking the patient to keep a sleep log to identify sleep habits and activities they might be performing before going to bed, which might affect their ability to sleep. A sleep diary, completed the following morning, can provide a record of the quantity and quality of their sleep the night before.

3. Excluding causes of insomnia: This step is to identify whether insomnia is primary or secondary to an identifiable cause—either a medical condition, including a psychiatric disorder, or a medication that a patient may be taking—which is potentially reversible, and addressing it should be the first approach to management. Common causes of secondary insomnia are listed in Table 1.

Distinguishing between primary and secondary insomnia can be difficult. Insomnia is frequently accompanied by another condition, and it is not always clear whether the accompanying condition plays a causal role or is merely comorbid. Other sleep disorders (sleep apnea and periodic limb movements) can also cause insomnia and need to be excluded.

Sleep apnea can be central, caused by a medical condition such as congestive heart failure or previous stroke, or obstructive, when the airways do not fully open or do not remain open during sleep (see Obstructive Sleep Apnea). Symptoms include snoring, restlessness during sleep, waking with feeling of panic, erectile dysfunction, and daytime sleepiness. If untreated, it can contribute to cognitive changes, obesity, impotence, hypertension, and myocardial infarction. The definitive changes can be identified by polysomnography (sleep study), which measures the number of apneic episodes in an hour.

RLS is an unpleasant, tingling, creeping feeling of restlessness in legs during sleep, with an irresistible urge to move. A related condition, but occurring during the day and often with involuntary jerking of the limbs, is referred to as periodic limb movement disorder.

4. Assessing the severity of a sleep problem and its consequences: There are a number of metrics that can be used to assess the severity of a sleep problem, including:

1) Sleep efficiency: The amount of time spent asleep expressed as a percentage of time spent in bed.

2) Sleep latency: The time it takes to fall asleep after going to bed.

3) Number of awakenings after falling asleep.

4) Wake after sleep onset: The amount of time spent awake after first falling asleep.

5) Total sleep time.

6) Nap time: The amount of time spent napping during the day.

The Epworth Sleepiness Scale also provides an estimation of the severity of daytime sleepiness. This scale is a short, self-administered questionnaire in which respondents are asked to rate their usual chances of dozing off or falling asleep while engaged in 8 different situations, including sitting and reading, watching TV, sitting and talking to someone, or being in a car while stopped for a few minutes in the traffic. The score ranges from 0 to 24. The higher the score, the higher a person’s average sleep propensity in daily life, or their daytime sleepiness.


The management of insomnia depends on the cause. For example, the treatment of secondary insomnia requires addressing any underlying primary conditions. Although the treatment of insomnia often focuses on the primary condition, in many cases there is a reason to treat insomnia directly, because it is partially independent, does not respond to the treatment of the primary disorder, or is misdiagnosed as secondary insomnia. Older adults warrant special consideration, as changes in drug metabolism, age-related illnesses, multiple comorbidities, and polypharmacy make this group particularly susceptible to developing insomnia.

The treatment of a sleep problem involves 5 steps, which should be approached sequentially:

1. Education about sleep: One of the first steps in any treatment approach is to explain the importance of sleep, encourage an individual to make it a priority, and look at some reasons why they may not have done so to date. Some of the specific areas to cover include:

1) The importance of sleep for mental and physical health and reasons why it needs to be seen as a priority.

2) Other consequences of insufficient sleep.

3) Explanation of the sleep cycle and what happens in each stage.

4) Dispelling sleep myths.

5) The effects of sleep medications.

6) Alternatives to sleep medications, including cognitive behavioral therapy (CBT).

2. Sleep hygiene: Sleep hygiene should be considered a part of the approach to every sleeping problem.Evidence 1Weak recommendation (benefits likely outweigh downsides, but the balance is close or uncertain; an alternative course of action may be better for some patients). Low Quality of Evidence (low confidence that we know true effects of the intervention). Quality of Evidence lowered due to risk of bias and imprecision. Morgenthaler T, Kramer M, Alessi C, et al; American Academy of Sleep Medicine. Practice parameters for the psychological and behavioral treatment of insomnia: an update. An American Academy of Sleep Medicine report. Sleep. 2006;29(11):1415-9. PMID: 17162987. Schutte-Rodin S, Broch L, Buysse D, Dorsey C, Sateia M. Clinical guideline for the evaluation and management of chronic insomnia in adults. J Clin Sleep Med. 2008;4(5):487-504. PMID: 18853708; PMCID: PMC2576317. There are many areas that can be covered, and these tips can also be provided as a single handout given to patients. Areas to include in an approach to sleep hygiene and specific steps that a person can take to improve their sleep environment are briefly outlined in Table 2.

3. Cognitive behavioral therapy for insomnia (CBT-i): CBT-i is a strongly recommended and effective treatment method and should be considered first.Evidence 2Strong recommendation (benefits clearly outweigh downsides; right action for all or almost all patients). High Quality of Evidence (high confidence that we know true effects of the intervention). Morgenthaler T, Kramer M, Alessi C, et al; American Academy of Sleep Medicine. Practice parameters for the psychological and behavioral treatment of insomnia: an update. An American Academy of Sleep Medicine report. Sleep. 2006;29(11):1415-9. PMID: 17162987. Schutte-Rodin S, Broch L, Buysse D, Dorsey C, Sateia M. Clinical guideline for the evaluation and management of chronic insomnia in adults. J Clin Sleep Med. 2008;4(5):487-504. PMID: 18853708; PMCID: PMC2576317. Its benefits last long after the therapy ends. There is no risk of CBT-i interacting negatively with other treatments, and it can be used in conjunction with medications. The downside is that it requires time and motivation, and there are not too many trained therapists providing CBT-i at the moment, especially in the public sector. On the other hand, many of these techniques can be taught in a group and, in the current digital era, they are increasingly accessible online or via mobile apps. Improvement may be observed after a few weeks, so patience is required. There are a number of specific techniques that can be used, including cognitive restructuring, stimulus control, sleep restriction, and relaxation techniques (Table 3). A treatment approach may combine several methods.

4. Over-the-counter (OTC) sleep aids: While medication has a role to play, it should be used judiciously, and its effects need to be closely monitored. This particularly applies to older adults, over a third of whom may be taking some medication to help them sleep. Options that can be considered include OTC sleep aids, such as antihistamines (which can cause cognitive changes and motor impairment), L-tryptophan, and herbal remedies (eg, valerian root, ginkgo biloba, kava kava), although the evidence for their benefits is very weak and should not be considered especially in older adults.Evidence 3Weak recommendation (downsides likely outweigh benefits, but the balance is close or uncertain; an alternative course of action may be better for some patients). Low Quality of Evidence (low confidence that we know true effects of the intervention). Quality of Evidence lowered due to risk of bias, indirectness, and imprecision. Culpepper L, Wingertzahn MA. Over-the-counter agents for the treatment of occasional disturbed sleep or transient insomnia: A systematic review of efficacy and safety. Prim Care Companion CNS Disord. 2015;17(6):10.4088/PCC.15r01798. doi:10.4088/PCC.15r01798. eCollection 2015. PMID: 27057416; PMCID: PMC4805417. Almond SM, Warren MJ, Shealy KM, Threatt TB, Ward ED. A systematic review of the efficacy and safety of over-the-counter medications used in older people for the treatment of primary insomnia. Sr Care Pharm. 2021;36(2):83-92. doi: 10.4140/TCP.n.2021.83. PMID: 33509331.

OTC melatonin, although having a favorable tolerability profile, is not routinely recommended for treating sleep onset or maintenance disorders and improving sleep quality.

Cannabis may decrease sleep latency, but it can impair sleep quality in the long term. Chronic use leads to suppression of slow-wave sleep and lack of dreams due to REM sleep suppression. Slow-wave sleep is the most restorative, so suppressing it leads to poor overall quality of sleep.

5. Prescription medications: These include benzodiazepine receptor agonists (eg, triazolam, temazepam, zolpidem, zopiclone, eszopiclone), melatonin agonists (eg, ramelteon), orexin receptor antagonists (eg, lemborexant), benzodiazepines (eg, lorazepam, clonazepam), antidepressants (eg, doxepin, trazodone, mirtazapine), antipsychotics (eg, quetiapine), anticonvulsants (eg, gabapentin, pregabalin), and norepinephrine alpha 2 receptor agonists (eg, clonidine). Prazosin, a sympatholytic alpha 1 adrenergic receptor blocker, can be used when symptoms of posttraumatic stress disorder (PTSD) are interfering with sleep.

The American Academy of Sleep Medicine has suggested several medications to be considered for sleep onset and maintenance disorders, as well as for specific groups such as older adults and those with chronic pain and insomnia (Table 4). However, the benefits of sleep medication, especially in the case of long-term use, remain unclear.

Guidelines for Prescribing Hypnotics

When prescribing hypnotics, the clinician needs to pay attention to the relationship they have with their patient, without feeling pressured into “doing something.” It can be helpful to have a clear contract, spelled out at the beginning of treatment, to which both sides adhere, rather than to negotiate at each stage of the process whether a medication is going to be discontinued or the dose adjusted. Educate the patient about tolerance and psychologic dependence and try to begin the management with sleep hygiene recommendations and CBT-i.

It is also important for the clinician to adhere to the following:

1. Limit the initial duration of therapy ideally to <1 month and then conduct a periodic tapering or discontinuation trial to determine whether the therapy can be stopped.

2. Explain to the patient the plan for using medication before prescription is given.

3. Even if it is helpful, pharmacotherapy should ideally be limited to <6 months—particularly for benzodiazepines—because of psychologic and physiologic dependence on a medication that may be providing little therapeutic benefit.

4. Medication should always be used in conjunction with education, sleep hygiene, and, where possible, CBT approaches.

5. Consider consultation with a sleep specialist before starting continuous, long-term therapy with hypnotic medication.

Treatment of Other Primary Insomnia

1. Sleep apnea: Behavioral therapy; avoiding alcohol, nicotine, and sleep medications; considering weight loss; use of a continuous positive airway pressure (CPAP) machine, which keeps the airways patent during sleep; sleeping on your left side. Dental appliances can sometimes help. See Obstructive Sleep Apnea.

2. RLS: Monitoring iron and magnesium levels, use of dopamine agonists such as ropinirole (0.25-4 mg) or pramipexole (0.125-0.75 mg), anticonvulsants such as gabapentin (600-2400 mg) or pregabalin (50-450 mg), and benzodiazepines such as clonazepam (0.5-1 mg) at night.


Table 16.12-1. Common medical conditions associated with insomnia


Arthritis and other painful chronic conditions

Chronic lung disease

Chronic kidney disease

Cardiovascular disease (heart failure, coronary artery disease)

Heartburn (GERD)

Neurologic disorders (eg, epilepsy, Alzheimer disease, Parkinson disease, stroke, tumors)



Menstrual disorders

Depressive disorders

Anxiety disorders

Bipolar disorders

Psychotic disorders

Autism spectrum disorders

GERD, gastroesophageal reflux disease.

Table 16.12-2. Steps of sleep hygiene


Tips for patients

Setting a consistent sleep schedule

– Have a fixed wake-up time

– Calculate a target bedtime based on your fixed wake-up time. Aim to be ready for bed around that time each night

– If falling asleep does not occur within 20 minutes, leave your bedroom and do something relaxing, read, or listen to soothing music; go back to bed when feeling tired; repeat as needed

Limiting naps

If you take naps, these should be relatively short (<30 minutes) and limited to the early afternoon.

Developing healthy daily habits

– Get daylight exposure

– Be physically active during the day

– Avoid smoking

– Reduce alcohol consumption later in the evening

– Limit the use of caffeine in the afternoon and evening (caffeine is a psychostimulant, in addition to its impact on adenosine levels)

– Avoid eating late and having heavy or spicy meals within several hours of bedtime

– Restrict in-bed activity only for sleep and sexual contacts

– Avoid prolonged use of light-emitting screens before bedtime

– Test methods of relaxation (eg, meditation, mindfulness, paced breathing); take a bath; try calming light scents (eg, lavender)

Optimizing sleep environment

– Have comfortable mattress, pillow, and sleepwear. Set a dark, quiet, and cool (~19-20 degrees Celsius) bedroom

– Use room darkening shades, earplugs, fans, or other devices to optimize your sleep environment

Adapted from

Table 16.12-3. Summary of the techniques for cognitive behavioral therapy for insomnia (CBT-i)



Cognitive restructuring

Identifying negative or self-defeating thinking that contributes to insomnia, challenging its accuracy, and replacing it with more adaptive or realistic thoughts, which reduces the affectual response. An individual can then use self-talk, distraction, or rationalization to replace the negative thoughts with more positive ones.

Dealing with worries before bedtime

An individual keeps a journal where they can write down thoughts that they cannot get out of their head. They then literally sign off on the journal for the evening, telling themselves that they will come back to it the following day but not during the night.

Stimulus control

Setting a consistent sleep-wake cycle and waking time, avoiding or reducing naps, using the bed only for sleep and sexual contacts, and leaving the bedroom when unable to fall sleep, returning when feeling sleepy.

Sleep restriction

Reducing the time spent in bed when not asleep. The goal should be to spend 85% to 90% of time in bed asleep.

Relaxation training

This can involve techniques that reduce stress arisen during the day and stress from worrying about not being able to sleep. During a planned relaxation period before bed, specific relaxation therapies to be tried include:

– Progressive muscle relaxation

– Meditation

– Imagery

– Self-hypnosis

– Diaphragmatic breathing

– Mindfulness

– Biofeedback

Table 16.12-4. Selective pharmacotherapy (nighttime doses) for insomnia

Sleep onset insomnia

Sleep maintenance insomnia

Insomnia in older adults

Insomnia and chronic pain

– Zolpidem: 5 mg for women, 5-10 mg for men

– Ramelteon 8 mg

– Temazepam 15-30 mg

– Zopiclone 3.75-7.5 mg

– Lorazepam 0.5-1 mg

– Doxepin 3-6 mg

– Zopiclone 3.75-7.5 mg

– Temazepam 15-30 mg

– Zolpidem: 5 mg for women, 5-10 mg for men

– Suvorexant 10-20 mg

– Lemborexant 5-10 mg

– Lorazepam 0.5-1 mg

– Doxepin 3-6 mg

– Zolpidem: 5 mg for women, 5-10 mg for men

– Zopiclone 3.75-7.5 mg

– Trazodone 25-50 mg

– Diazepam 2-5 mg

– Gabapentin 300-900 mg

– Nortriptyline 10-50 mg

– Duloxetine 30-90 mg

– Diazepam 2-5 mg

– Zolpidem: 5 mg for women, 5-10 mg for men

– Topiramate 25-100 mg

– Trazodone 25-100 mg

– Pregabalin 50-200 mg

Adapted from J Clin Sleep Med. 2017 Feb 15;13(2):307-349.

We would love to hear from you

Comments, mistakes, suggestions?

We use cookies to ensure you get the best browsing experience on our website. Refer to our Cookies Information and Privacy Policy for more details.