My experience with insomnia began when I was 6 or 7, though I didn’t recognize it as such. In those days, I thought of it as a gift. I had a window that faced east, and in the mornings, a sweet, clear light would pour over my bed, rousing me from the middle of my dreams. I went to bed late and woke up early, and when I did sleep, I slept lightly, waking many times in the night to register the clocklike clicking of a raccoon’s claws on the roof, an especially noisy frog or the breathing and muttering of the house as it rolled and shifted position with the temperature, my fellow restless sleeper.

This time I spent lying half-awake made up the most precious moments of my existence. All the ideas of the day moved in like soft clouds, then broke apart into fantasies; I felt both a gathering and an exhilarating dissolving of my identity. But my pleasure wouldn’t last long. After a few years of working life, all my perceptions of sleep and rest changed, and I began to hate and fear my insomnia. Desperate, I lined up at the pharmacy to fill one of the 60 million prescriptions written every year for chemical sleep aids in America; I became part of what the Centers for Disease Control and Prevention have declared a full-blown “public-health epidemic.” It was amazing: What had been my life’s strangest blessing became its greatest curse.

In the last year or two, an obsessive fixation on getting sleep — not just any sleep, but good sleep — has crept into our public consciousness. In the early 2000s, the small number of New York Times articles that referred to sleep mostly instructed new mothers on how to get their babies to nod off. Not so in 2013 and early ’14, when there were articles on how insomnia makes you fat, sleep seminars, exercising for better sleep, napping for success, sleep as depression cure and an array of new, supposedly soporific devices and products, including dozens of sleep-monitoring smartphone apps, alarm clocks that won’t wake you during REM stages, sleep-inducing chocolates, candles that crackle like fireplaces, technologically enhanced sleep masks that “switch off your mind,” fitness bracelets that give you a sleep score (“I really want to do well in terms of sleep, I want to maintain my streak!” one user wrote) and a $12,000 sleep-enhancing mattress containing soothing seaweed and coconut husks.

There were also books, like “Effortless Sleep” and “Prime Your Mind for Sleep” and “The Secret World of Sleep”; radio specials; a Harper’s symposium; and major surveys of sleep science in The Atlantic and The New Yorker. And in keeping with the times, there are endless listicles: 10 Foods to Avoid for Better Sleep, 10 Signs You May Be Sleep Deprived, 12 Simple Steps to Improve Your Sleep, the purposes of five-, 20-, 45-, versus 60-minute naps. There’s even a website called Sleepyti.me, which helps users calculate an optimal bedtime or wake-up time, to avoid interrupting their 90-minute sleep cycles.