Insomnia: What to Do and When to See a Doctor

Quick answer: for short-term insomnia, adjusting your routine often helps: a fixed wake-up time, a dark and quiet bedroom, less caffeine and fewer screens at night. See a doctor if changing your habits has not worked, if tiredness is getting in the way of your days, or if the trouble has lasted three nights a week for three months or more. For chronic insomnia, guidelines name cognitive behavioral therapy for insomnia (CBT-I) as the first choice, and any decision about medication belongs to a doctor.
In 1966, the journal Archives of General Psychiatry published an unusual case report. Researchers George Gulevich, William Dement and Laverne Johnson described psychiatric and EEG (brain-wave) observations of a prolonged stretch of wakefulness: 264 hours without sleep, or 11 days in a row.
Almost nobody stays awake like that on purpose. The far more common story is the opposite: you want to sleep, you go to bed early, you turn off the light, and sleep simply does not come. Or it comes and leaves at 3 a.m. The next night, the scene repeats, and the bed slowly turns into a place of worry.
If you typed "insomnia, what to do" in the middle of the night, this article is for you. Here is what insomnia is, what researchers call sleep hygiene, how much sleep each age needs, and when it makes sense to see a doctor.
What is insomnia, and when is it more than a bad night?
Insomnia is not just "sleeping little." The Brazilian Insomnia Consensus, issued by the Brazilian Sleep Association, describes three main complaints, which often show up together:
- trouble falling asleep;
- trouble staying asleep, with waking in the middle of the night;
- waking earlier than you want and being unable to fall back asleep.
To call it chronic insomnia, these complaints must occur at least three times a week for at least three months and come with daytime consequences: tiredness, low energy, poor concentration and memory, irritability. England's National Health Service (NHS) uses the same time yardstick: under three months is short-term insomnia, and three months or more is long-term. A single poor night happens to everyone and is not insomnia.
The problem is common. According to the Brazilian consensus, 30% to 36% of people report nighttime insomnia symptoms in population studies. When daytime impact is also required, the rate falls to 10% to 15%, and under formal diagnostic criteria it is between 5% and 10%. Insomnia is more common in women (especially after menopause), in middle-aged and older people, in shift workers, and in people with other medical or psychiatric conditions.
What are the most common causes of insomnia?
There is rarely a single cause. Specialists often explain chronic insomnia with the "3 P" model: factors that predispose (genetics, an anxious personality, family history), factors that precipitate (a stressful period, a loss, an illness) and factors that perpetuate, meaning the habits people build to make up for a bad night that end up keeping the problem going, such as napping in the afternoon or spending hours in bed trying to fall asleep.
Among everyday triggers, the NHS lists:
- stress, anxiety or depression;
- noise, a bedroom that is too hot or too cold, an uncomfortable bed;
- alcohol, caffeine and nicotine;
- recreational drugs;
- jet lag and shift work.
Some health conditions also disrupt sleep: sleep apnea (snoring with pauses in breathing), restless legs syndrome, an overactive thyroid, menopause, Alzheimer's disease and Parkinson's disease, as well as mental health disorders. Several medications can cause insomnia as a side effect, so it is worth telling your doctor everything you take.
The link with mental health deserves special attention. Insomnia and depression often go hand in hand, and each can make the other worse. If poor sleep comes with persistent sadness or a loss of interest in things, see also our article Vamos falar de depressão? (on depression, in Portuguese).
How many hours of sleep do you need at each age?
The ideal amount varies from person to person, but there are reference ranges. The American Academy of Sleep Medicine (AASM) published these recommendations for children and teenagers, counting naps in the younger ages:
- 4 to 12 months: 12 to 16 hours per 24 hours;
- 1 to 2 years: 11 to 14 hours;
- 3 to 5 years: 10 to 13 hours;
- 6 to 12 years: 9 to 12 hours;
- 13 to 18 years: 8 to 10 hours.
For adults 18 to 60, the AASM and the Sleep Research Society recommend 7 hours or more per night on a regular basis. A good gauge is the next day: if you are constantly tired during the day, you are probably not getting enough sleep, whether in quantity or in quality.
Do naps help babies learn, and how should a baby sleep?
All signs point to yes. In 2015, researchers at Ruhr University Bochum in Germany published an experiment in the journal PNAS with babies aged 6 and 12 months. The babies watched a person repeat a few actions with a puppet. Some then napped for at least 30 minutes within the next four hours, while others did not nap. Only the babies who slept remembered the actions in the test, and a day later they still performed better. The result suggests that sleep helps lock in this kind of memory as early as the first year of life. It is a lab study of one specific type of memory; it does not show that pushing a nap improves development. Every baby has their own rhythm, and questions belong with the pediatrician.
In practice, naps count toward the 12 to 16 hours a day recommended at that age. And how a baby sleeps matters as much as how long: the American Academy of Pediatrics (AAP) advises always placing the baby on their back, in a crib with a firm mattress and only a fitted sheet, with no pillows, blankets, toys or bumpers. The recommendation is to share a room with the parents for at least the first six months, but with the baby in their own crib, not in the adults' bed. A sofa or armchair is not a place for a baby to sleep either, alone or with an adult. The surface should be flat: the AAP considers any surface inclined more than 10 degrees unsafe. That is why car seats, strollers and swings are not places for naps, and a baby who falls asleep in one should be moved to a crib, on their back, right away.
What is sleep hygiene, and how do you put it into practice?
Sleep hygiene is the name for a set of habits and bedroom conditions that favor a good night's sleep. Based on NHS guidance, it can be summed up like this.
What usually helps
- Go to bed only when you feel sleepy.
- Wake up and get out of bed at the same time every day, including after a bad night and on weekends.
- Set aside at least an hour before bed to wind down: a bath, a book, quiet music.
- Keep the bedroom dark and quiet. Curtains, an eye mask or earplugs can make a difference.
- Get regular physical activity during the day.
- Make sure your mattress, pillow and bedding are comfortable.
What usually gets in the way
- Coffee, tea, alcohol and cigarettes in the six hours before bed.
- A heavy meal late at night.
- Exercise in the four hours before bedtime.
- TV, phone and tablet right before sleep.
- Daytime naps.
- Sleeping in to "make up" for a poor night.
These habits tend to help with short-term insomnia, the kind that shows up during exam week or after bad news. For chronic insomnia, though, the Brazilian consensus is clear: sleep hygiene alone has limited effect. It remains important, but as one piece of a more complete treatment.
What is the first-line treatment for chronic insomnia?
It is cognitive behavioral therapy for insomnia, known as CBT-I. The American College of Physicians (ACP) recommends in its 2016 guideline that all adults with chronic insomnia receive CBT-I as the initial treatment. The AASM published its own guideline on behavioral and psychological treatments in 2021, and the Brazilian Insomnia Consensus, from 2023, considers multicomponent CBT-I the reference treatment.
The therapy targets exactly the factors that keep insomnia going. According to the Brazilian consensus, its core components are:
- Psychoeducation and sleep hygiene: understanding how sleep works and adjusting habits.
- Stimulus control: learning to link the bed with sleep again, rather than with the distress of lying awake.
- Sleep restriction: adjusting, under professional guidance, the time spent in bed so that sleep becomes more consolidated. This is not something to do on your own, because it can increase daytime sleepiness, so take care when driving. People with other health conditions need guidance from a professional.
- Cognitive therapy: working on beliefs and thoughts about sleep that feed anxiety at bedtime.
- Relaxation techniques.
It usually takes four to eight sessions with a trained professional. The consensus notes that online care was not shown to be inferior to in-person care, which widens access. Mindfulness practices are also being studied in combination with CBT-I.
What about sleeping pills? They exist and are appropriate in some cases, but the decision always rests with a doctor, after assessing each person. The NHS notes that these medicines can have serious side effects and cause dependence, and that today they are prescribed for short periods and only when other approaches have not worked. So do not start or switch a sleep medication on your own or on a friend's advice. Even those sold over the counter call for a prior conversation with a doctor or pharmacist, can cause drowsiness (take care when driving) and, according to the NHS, should not be used for more than 1 to 2 weeks.
Does yoga help you sleep?
Many people with insomnia describe the same scene: a tired body and a racing mind, replaying what is left to do. That is why yoga, which combines postures, breathing and relaxation, is a popular bedtime practice.
A systematic review published in 2020 in BMC Psychiatry pooled 19 studies with 1.832 women with sleep problems. It found a small improvement in self-reported sleep quality compared with control groups that did no practice, with no serious adverse effects. The review looked only at yoga in women and did not analyze breathing or meditation on their own. The limits show up in the details: in the three studies that measured insomnia severity, there was no effect, and in women with breast cancer or in perimenopause and postmenopause the benefit was not confirmed. Yoga can be a good addition to your routine, but it does not replace a doctor's visit or CBT-I when insomnia is chronic.
When should you see a doctor?
You do not have to wait three months if tiredness is already affecting your days. Make an appointment if:
- changing your habits has not helped;
- the trouble sleeping has lasted for months;
- tiredness is getting in the way of work, school, driving or relationships;
- someone notices that you snore loudly and stop breathing during sleep;
- you feel an irresistible urge to move your legs when you lie down;
- the insomnia came with sadness, low mood or anxiety that will not go away.
The first step can be a general practitioner or family doctor, who looks into the causes and, when needed, refers you to a doctor who works in sleep medicine, a psychiatrist, a neurologist or a pulmonologist, depending on the case. Sometimes a sleep study, called polysomnography, is ordered.
Some signs call for immediate help. Thoughts of hurting yourself or not wanting to live: call the CVV, Brazil's suicide prevention and emotional support line, at 188 (free, 24 hours), or go to an emergency room. Sleepiness that makes you "black out" at the wheel: do not drive, and seek care. In any emergency, call SAMU, Brazil's emergency medical line, at 192.
The bottom line
The 11 days without sleep in 1966 are an extreme case. People with insomnia live a slower, quieter version of sleep loss: short nights that pile up and take their toll on mood, memory and energy.
The good news is that insomnia can be addressed. Start with your routine: a fixed wake-up time, a suitable bedroom, fewer screens and less caffeine at night. If the problem persists, it is not a lack of willpower. It is time to talk to a doctor, who may recommend cognitive behavioral therapy, the treatment the main guidelines put first.
Frequently asked questions
Is one bad night of sleep already insomnia?
No. Isolated bad nights happen to everyone. Chronic insomnia is when the trouble occurs at least three times a week for three months or more and affects the next day.
Does lying in bed trying to fall asleep help?
It usually makes things worse. Spending a long time awake in bed strengthens the link between the bed and anxiety. This is one of the points addressed in cognitive behavioral therapy for insomnia.
Does an afternoon nap interfere with sleep at night?
For people with insomnia, the NHS advises avoiding daytime naps, because they reduce the urge to sleep at night. If the tiredness is strong, talk to a doctor.
Can insomnia therapy be done online?
Yes. The Brazilian Insomnia Consensus notes that online CBT-I was not shown to be inferior to in-person therapy.
Sources
- Associação Brasileira do Sono (Brazilian Sleep Association). Consenso de Diagnóstico e Tratamento da Insônia em Adultos 2023. absono.com.br
- NHS. Insomnia. nhs.uk
- NHS. Sleep apnoea. nhs.uk
- Paruthi S. et al. Recommended Amount of Sleep for Pediatric Populations: A Consensus Statement of the American Academy of Sleep Medicine. J Clin Sleep Med, 2016. PMC4877308
- Watson N. F. et al. Recommended Amount of Sleep for a Healthy Adult: A Joint Consensus Statement of the AASM and Sleep Research Society. Sleep, 2015. PMC4434546
- Qaseem A. et al. Management of Chronic Insomnia Disorder in Adults: A Clinical Practice Guideline From the American College of Physicians. Ann Intern Med, 2016. PubMed 27136449
- Edinger J. D. et al. Behavioral and psychological treatments for chronic insomnia disorder in adults: an American Academy of Sleep Medicine clinical practice guideline. J Clin Sleep Med, 2021. PubMed 33164742
- Gulevich G., Dement W., Johnson L. Psychiatric and EEG observations on a case of prolonged (264 hours) wakefulness. Arch Gen Psychiatry, 1966. PubMed 5939071
- Seehagen S. et al. Timely sleep facilitates declarative memory consolidation in infants. Proc Natl Acad Sci U S A, 2015. PubMed 25583469
- Wang W. L. et al. The effect of yoga on sleep quality and insomnia in women with sleep problems: a systematic review and meta-analysis. BMC Psychiatry, 2020. PubMed 32357858
- American Academy of Pediatrics. A Parent's Guide to Safe Sleep. healthychildren.org
- CVV: Centro de Valorização da Vida (Brazil's suicide prevention and emotional support service). cvv.org.br
Important: this article is for information and education only. It helps explain the topic, but it cannot be used to diagnose or treat you, or to make decisions about your health on your own. Everyone's medical history is different: to assess your case, talk to a doctor, preferably a specialist in the field.
Information checked against the sources cited above · Last reviewed: October 2026.
Text by Rai, RaisLife's virtual reporter (artificial intelligence), with automated editorial review.