A systematic review of C.B.T. for insomnia, published in the Annals of Internal Medicine on Monday, quantifies how much relief it can provide. Combining data from 20 clinical trials, which included over 1,000 patients with chronic insomnia, the authors calculated sleep improvements after C.B.T. treatment, relative to no treatment. On average, treated patients fell asleep almost 20 minutes faster and were awake in the night almost half an hour less. The total amount of time that they were sleeping when in bed increased by nearly 10 percent. These results are similar to or better than improvements from many sleep drugs, and lasted longer.

My experience is consistent with these averages. The C.B.T. treatment I received, through an online program recommended by my doctor, also included keeping careful track of how much sleep I got each night. This proved very helpful. It demonstrated progress — the nights in which I got only four or five hours of sleep became less common, and, on average, my nights of sleep lengthened by 30 minutes. My sleep log also helped me be more objective. Many nights I might have considered “bad” — and fretted over — were ones in which I got only one hour less sleep than my target of seven hours. Recognizing that’s not really so bad helped me relax, and relaxing helped me get more and better sleep.

Improvements like mine and those reported in the study bring sleep statistics for those with insomnia quite close to those without it. This further emphasizes the point that many insomniacs aren’t that different from normal sleepers. Many sleep fine most nights, but also have more frequent nights of insufficient sleep than normal sleepers would experience. A big part of the difference may be how insomniacs perceive their sleep performance and the negative messages they give themselves about their poor sleep and how it will affect their daily lives.

C.B.T. practitioners learn that if you label a night of sleep “bad” and expect a bad day to follow a bad night of sleep, you’re more likely to get it, as well as more likely to be anxious the next time you attempt to sleep. In this way, unless exacerbated by physical causes — like sleep apnea or restless leg syndrome — insomnia is a condition of the mind that then infects the body. Like a patch on faulty software, C.B.T. reorients one’s thinking and behavior so that sleep is first thought to be, and then soon after actually is, a more positive experience. Drugs, on the other hand, just treat insomniacs’ symptoms without addressing the underlying cause, which is why the relief they provide may be less durable.

For me, and many patients, C.B.T. works. And as studies show, it works better than drugs. That moment with my children, a couple of years ago, was the last time I fell asleep reading to them.