My face is all but obscured by sticky white adhesive patches, each bristling with multicolored wires. Several more sensors are buried in my hair and glued to my skull; there's a nasal tube with some weird dangly thing attached to it hanging under my nose. More of these wired-up patches are glued to various places on my chest, and a pair of them snake beneath my clothing and run down each leg. When I walk around, I trail a tangle of cables.

A very patient staffer at a suburban Baltimore sleep clinic has rigged me into this gear, a process that has taken a good 30 minutes. It reminds me a bit of what it might be like to be an astronaut getting strapped into a space suit. After I'm fully enmeshed in this web of wiring, I'm instructed to get into bed, where even more sensors are attached, including a pulse oximeter stuck on my finger. Then all the wires are plugged into a series of jacks in the wall. Should I want to get up during the night, I'll have to summon assistance and have an attendant unplug me first.

Once installed in bed, I'll have to remain that way for the next seven hours, while a night vision camera, a microphone and all these wires record every twitch and snort. Known as polysomnography tests, these are designed to track a whole suite of physical processes, from brain waves and eye and limb movements to heart activity and blood oxygenation levels. Collectively, all these sensors can draw an exquisitely detailed portrait of a surprisingly mysterious — and increasingly elusive — state of being: the sleeping self.

But for all of that to happen, first I'm going to have to fall asleep.

Awake in America

For millions of us, the pursuit of a good night's rest has become a kind of dark obsession. We're getting an hour less sleep per night, on average, than our forebears did a few generations ago. In 1942, only 11 percent of Americans slept six hours or less a night. By 2013, 40 percent did. Older adults are more vulnerable to sleep disorders, particularly obstructive sleep apnea, an intermittent breathing problem that causes serious health issues.

So many seem to be getting so little shut-eye that in 2011, the Centers for Disease Control and Prevention declared the sorry state of the nation's slumber a public health problem: Some 80 million adult Americans aren't getting enough sleep, the latest CDC study says. The National Institutes of Health states that 70 million adults suffer from sleep difficulties. In a 2015 survey of the top health complaints, sleep issues have climbed to No. 2. "It didn't use to be in the top five," says Mayo Clinic pulmonologist Timothy Morgenthaler, former president of the American Academy of Sleep Medicine. "Is there a sleep crisis? Well, define 'crisis.' These problems have definitely increased radically in the past few years."

Experts have identified several reasons why, including rising obesity and the unprecedented number of adults taking medications such as antidepressants. But for many, sleeping less is a choice: We're watching TV, fiddling on Facebook or otherwise occupied in front of electronic screens deep into the wee hours. This consumes more than 11 hours per day for an average adult, according to Nielsen estimates. All those tablets and smartphones and TVs collectively conspire to steal our sleep by emitting a high-intensity light that scrambles our circadian rhythms, which evolved to follow the cycles of natural daylight.

We're also subject to the workplace phenomenon of "sleep shaming" — when alpha-achiever types humblebrag about how late they work and how early they rise. This is hardly new: Thomas Edison, a champion sleep shamer, claimed to need no more than four hours of rack time and demanded the same of his employees. He's a formative figure in what Penn State labor history professor Alan Derickson, in his book Dangerously Sleepy, dubbed "the cult of manly wakefulness." (A period exemplar: Charles Lindbergh, who claimed to stay up for 63 hours during his transatlantic flight.) "We are always hearing people talk about 'loss of sleep' as a calamity. They better call it loss of time," Edison once proclaimed. "There is really no reason why men should go to bed at all."

On the other side of this late-night culture war stand pro-sleep evangelists such as Huffington Post founder Arianna Huffington, whose book The Sleep Revolution joins several new self-help tomes promising to restore sanity to the night. "We're a society that's on the clock," says Matt Berical, senior editor of Van Winkle's, an online publication devoted to sleep. "The next great struggle for us is, how are we going to get rest? Sleep inequality will be a big issue in the future. There are services that will be available only to people who can afford it."

The sleep gap is just one of many stubborn disparities that haunt the night. The wealthy sleep better than the less affluent, and whites sleep better than African Americans. Women sleep more than men, although men are more satisfied with their sleep. And age itself is a factor, says University of Chicago epidemiologist Diane Lauderdale, who studies the sleep patterns of various populations. "Young adults sleep better and sleep more. If you expect to be able to sleep like you did when you were 26, you're going to be disappointed."

Lauderdale goes on to caution that, when it comes to how well we're sleeping, we're not the best judges. Since population-based studies tend to rely on self-reported surveys, the current epidemic of sleep woes could in part be in our (aging) heads. "Everyone personally used to sleep better, so it sounds reasonable to think it's something the whole population is going through," she says. "The fact that we are being bombarded with people telling us we're not sleeping enough can influence our perceptions."

What isn't in dispute is how absolutely critical it is to get enough sleep. In animal studies, sleep deprivation has a horrific impact — rats kept awake died in agony within weeks. But it wasn't until UCLA biomathematician Van Savage published a 2007 paper comparing sleep duration and metabolic rates that scientists were able to mount "a compelling argument for the core function of sleep," says Charles Czeisler, chief of the Division of Sleep and Circadian Disorders at Brigham and Women's Hospital in Boston. According to the theory, sleep is the brain's overnight rinse cycle, a time for flushing cellular debris generated by metabolic activity. "The brain has to go offline during that process," Czeisler says. "That's what we call sleep."

There's no getting around the damage done by failing to run your neurochemical dishwasher: One bad night translates into a day of diminished executive function, foggy memory and sludgy mental acuity. In older adults, bad sleep can speed the development of cognitive impairments.

Unfortunately, understanding why it's important to go to sleep doesn't make it any easier to get there.

AARP Members Enjoy Health and Wellness Discounts

Eyes wide open

You have to admire the capitalist drive that keeps finding new ways to monetize an indispensable biological function: Sleep aids and remedies represented a $41 billion market in 2015; by 2020, Americans will be spending $52 billion, consumer analysts say. A growing slice of that market consists of electronic monitors that promise to quantify and improve our sleep. Specialists seem ambivalent on the utility of sleep trackers — some fear that they only make patients more anxious about nodding off. "My colleagues who have patients with insomnia can't stand the things," says Morgenthaler.

Insomnia ranks at the top of the list of U.S. sleep complaints: One in 10 Americans report chronic insomnia, and about half say they have at least one symptom of it once a week. And there are a lot of ways to have a bad night: Sleep technician David Brooks, who manages the sleep lab at the University of Maryland St. Joseph Medical Center outside Baltimore, tells me there are 88 distinct sleep disorders. Among them is misperception disorder — when you sleep fine but are convinced otherwise.

To tease out the truth behind our slumbers, consumer-grade sleep monitors won't do the job; you need a polysomnogram (PSG) at a sleep lab. A PSG is the gold standard of sleep research, and we're getting a lot more of them. Medicare paid for more than 324,000 diagnostic sleep studies for older Americans last year, compared with just over 200,000 in 2004, and there are currently more than 2,500 accredited sleep labs across the United States.

I scored a PSG prescription when I told my doctor about a mild but persistent snore. This seemed mortifying but harmless, just another harbinger of midlife decrepitude. But beyond the spousal-annoyance factor, the snore flagged a deeper concern: My nights had seemed less restful lately, punctuated by mysterious bouts of maddening wakefulness. Sleeping well had become another one of those things that used to be natural and effortless and was now subtly but irremediably worse.

The quality and structure of sleep — what's called sleep architecture — often changes at midlife. Older people don't sleep as deeply; their sleep is more fragmented, and they're prone to being roused earlier. "A younger person can stay up till 4 a.m. and sleep till noon. An older person who stays up that late will likely wake up the next day much closer to the same time they usually do," says Czeisler. Sleep woes often surface among retirees, he says, because they've been released from the schedules that defined their working lives. "They've been slogging away their whole working life, getting up at 5 a.m., looking forward to the day when they could finally sleep in." And then they pop awake at the same time, or even earlier.

Aging internal clocks also tend to be more easily addled by artificial light or interruptions, so all the shopworn principles of good "sleep hygiene" — no TV before bed, maintaining a strict schedule — are extra important. On my visit to the sleep lab, I've been scrupulous with my sleep hygiene: I've avoided alcohol, email and HBO for the evening. My hospital room is optimized for slumber: dark and cool. Still, I'm braced for a grueling exercise in futility. Beyond the creepy surveillance vibe — night vision cameras and microphones are monitoring me at all times — there's the tickly tangle of wires, which makes shifting around in bed nearly impossible.

But before I even have time to truly embrace the unpleasantness, things start to get blurry.

Taming the apnea monster

Most of my fellow sleep-lab patrons are here for one reason: sleep apnea. Some 40 million people have apnea or related forms of sleep-disordered breathing (it afflicts a quarter of middle-aged men), yet the vast majority have never been diagnosed. Morgenthaler calls apnea "the elephant in the room": It's usually easy to treat with a CPAP (continuous positive airway pressure) machine but can be lethal if undiagnosed. A study from the University of Wisconsin School of Medicine and Public Health revealed that those with severe apnea are four times more likely to have a stroke, twice as likely to develop depression and five times more likely to die from cancer. Another study found that apnea sufferers develop Alzheimer's disease five years earlier than those who sleep soundly; milder cognitive impairments come a decade earlier in those afflicted with apnea.

Nearly everyone with apnea also snores to some degree, which didn't bode well for the likes of me. But in truth, I had no idea what my sleep study would uncover, or even if I'd nod off long enough to learn anything besides "Sleep studies are terrible." So when I heard a voice on a loudspeaker a little before 6 a.m., I couldn't have been more surprised.

As it turned out, I aced the thing, tickly wires and all. Once or twice the finger clip holding the blood-oxygenation monitor fell off and had to be replaced, but I quickly conked out again. For me, a sleep-study lab was a supremely restful setting. And when I get my official results a few weeks later, pulmonologist Jason Marx, director of the St. Joseph Medical Center's Sleep Disorders Center, confirms it. "You sleep really well," he says with a seen-it-all shrug, surveying the pages of my EKG. Sleep efficiency: 91 percent. A little mild snoring but no apnea. The snoring could be managed with a few behavioral tweaks, such as sleeping on my side and forgoing an extra glass of wine. (For my wife: earplugs.)

There's more good news. Getting older isn't always a one-way ticket to lousy sleep — if you are in good overall health. Complaints about sleep peak in middle age, then diminish. In fact, those over 65 are far more likely to report having a good night than are adults under 30. It may be more a matter of perception than reality, but the stats look even better when adjusted to eliminate those with obesity, diabetes or depression. "If they don't have those diseases, older people are perfectly capable of sleeping well," says Morgenthaler.

The secret, such as it is, is boringly fundamental: Get some exercise, ban bedroom electronics, lay off the booze and drugs, and don't stress out when roused mid-sleep. "We all want to go for the magic whatever. But the best starting place is basic healthy habits," Morgenthaler adds. Most critically: duration, duration, duration. It takes time for the little cellular-repair crews to do their jobs, and no app or sleep hack can truly substitute. "You can't cram seven hours of sleep into five hours," he says. "If you go below seven hours, bad things start to happen."

This is the rule I hear in my head every evening now, nagging me upstairs. Put down the book; snap the laptop. Life being what it is, bad things will happen anyway. No need to give them a hand. Go to bed. It's time to get some sleep.

Topic Alerts

You can get weekly email alerts on the topics below. Just click “Follow.”