For her sleep-lab session, Barbara Moffet had 26 wires attached to her scalp, face, fingers and legs. (Andre Chung for The Washington Post)

I t’s 1 in the morning and I’ve been in bed for a few hours now. Maybe it’s the few drops of caffeine I mistakenly drank earlier in the day. Or perhaps it’s the 26 wires that are attached to my scalp, face, finger and legs and the strap pulled taut around my waist. All I know is I’m not doing what you’re supposed to do in a sleep lab, and if I don’t fall asleep soon, it’ll be time to take off my pajamas and go home.

I’m here because my doctor thought it was time to find out what was causing a cluster of possibly sleep-related health issues: snoring, frequent middle-of-the-night waking and some problems with concentrating that I’ve had most of my 63 years. I also have a genetic condition, Ehler-Danlos syndrome, that can cause airways to partially close during sleep.

I’ve landed at Sleep Centers of Northern Virginia in Alexandria, one of at least two dozen sleep labs in the area.

According to the National Institutes of Health, some 70 million Americans are “poor sleepers,” and the ramifications of inadequate shut-eye can range from grumpiness and lack of focus to heart disease, diabetes, high blood pressure and even a diminished life expectancy.

Dozens of sensors record the variables associated with sleep. (Andre Chung for The Washington Post)

Research published this year in the journal Neurology concluded that people with sleep apnea — a disorder that causes a person to repeatedly stop breathing during the night, rousing them from sleep — developed problems with cognition about 10 years earlier than other people.

“It’s a much more severe disease than people recognize,” says pulmonologist Richard A. Hoffman, medical director of the Sleep Centers. “Sleep apnea is now being correlated with high blood pressure, heart rhythm problems, stroke, decreased immunity and even cancer.”

Every year about 500 patients pack an overnight bag and head to the Alexandria sleep lab around 8:30 p.m. and settle into one of four bedrooms to figure out why they can’t get a decent night’s sleep. A basic study costs $2,400, and most health insurers cover it. Pilots, truck drivers and others who work in positions where falling asleep could endanger people’s lives also come to take a test to gauge their ability to stay awake and alert.

My room, painted a soothing pale-blue gray, resembles one in a hotel, complete with double bed, television and sink; a full bathroom lies just next door. Pillows are provided, though I brought my own: It’s the only one my neck muscles will tolerate.

A video camera for recording the nocturnal action is mounted largely out of sight over the door, and I get to choose when to settle down. At about 9 p.m. I put on my pajamas, get into bed and read, trying to pretend that I am in my own bed at home.

I’m still feeling wide awake around 11 p.m. when technician Amber Garrett walks in and uses a thick paste to apply electrodes to my scalp, face and neck to measure my brain waves and facial movements such as jaw clenching. This approach is considered the gold standard of sleep science, a field founded by William Dement. A professor of psychiatry and behavioral sciences at Stanford University School of Medicine, he opened the world’s first sleep disorders clinic, at Stanford, in the 1970s.

With the help of Amber Garrett, a polysomnographic technologist at Sleep Centers of Northern Virginia, Moffet re-enacts her sleep lab preparation for a photographer. (Andre Chung/for The Washington Post)

Garrett also attaches electrodes to my calves to detect muscle movement. The wires are then plugged into a box, which is attached by cable to a small computer next to my bed. An oxygen sensor is clamped to my left index finger. Straps to monitor breathing are wound around my chest and waist.

Among other things, the sensors will be checking my “sleep architecture” — how well I achieve and maintain key sleep cycles, especially deep sleep.

After an initial 90 minutes or so of sleep, we enter a deeper form — rapid eye movement (REM) sleep, when dreaming occurs. Throughout the night, we alternate between the deeper REM and the lighter NREM (non-rapid eye movement) sleep, shifting about every 90 minutes.

Garrett wishes me a good night, turns out the light, closes the door and heads for her computer and other devices to start the study.

Garrett, a sleep study technician for 10 years, has seen pretty much the entire range of sleep issues: snoring, apnea, insomnia, idiopathic hypersomnia (an excessive daytime sleepiness of unknown origin) and narcolepsy, which causes someone to uncontrollably fall asleep at random times.

She also has observed more dramatic sleep-related movement disorders: restless legs syndrome, which causes tingling, stinging or creepy-crawly sensations before bedtime; periodic limb movement disorder, an involuntary rhythmic movement of the legs, feet or even arms during sleep; REM behavior disorder, in which a person’s muscles respond to dreamed events, sometimes punching or kicking a bed partner or even rising from bed to act out dreams.

Garrett recalls a young woman who came to the lab with the complaint that she was waking up in the morning tired, with achy legs. On the night of her study, she twice got out of bed, still asleep, and marched and jogged for 40 minutes each time. This explained how the woman’s reading glasses had gotten mashed a few months earlier; she was elated to solve the mystery. The patient was prescribed a drug that relaxes the central nervous system and suppresses muscle movements.

Sleepwalking, sleep talking, sleep eating also go on at the lab. As many as 15 percent of the population, many of them children, may sleepwalk at some point in their lives. In one case, a patient called Garrett’s name in the middle of the night, even though Garrett could tell from the monitors that the woman was asleep. After Garrett entered the bedroom, the patient pointed and asked whether the bench that she was purchasing should be put by the tree or next to them. When Garrett asked if she knew where she was, she replied, “Of course, we are right outside my house on the porch.” When told she was actually in a sleep lab, she said “Okay” and went back to sleep.

A host of other sleep-related disorders also drive people to the lab: nightmares, night terrors, bed-wetting, teeth grinding, dementia-related sleep disturbance and even something called exploding head syndrome, in which the patient hears ear-splitting sounds just as he’s falling asleep.

The most common problem is apnea, which is caused by a blockage of a nasal or oral passage that leads a sleeper to stop breathing. A person with apnea will wake very briefly throughout the night while struggling to get enough air and to resume breathing. Instead of returning to deep sleep, the sleep cycle has to restart. Apnea also can result from a neurological condition that causes the brain to temporarily “forget” to breathe. Besides being linked to some serious diseases, sleep apnea is thought to affect memory and concentration.

Several treatments are available to treat apnea, the most common a continuous positive airway pressure (CPAP) device, which delivers air pressure through a mask a person wears during sleep, helping to keep airways open.

Sometimes the lab uncovers conditions that surprise the patient. “We often see things during sleep that have not been detected when the patient is awake,” Garrett says. “For example, heart arrhythmias not noticeable during the day can show up on the nighttime EKG.”

Garrett, 36, has sleep challenges of her own, given that she works all night. She follows strict protocols to make sure she gets enough sleep, which she schedules from about 8 a.m. to 4 p.m. No matter what the weather, she wears sunglasses on her drive home from work, and her bedroom is outfitted with blackout curtains, all with a goal of tricking her brain into thinking it’s night.

In my case, I finally fall asleep — or so I’m told — at 1:09 a.m., about three hours later usual, and I am aroused at 5 a.m. when Garrett comes in to remove the electrodes. I’ve had a fitful night: I don’t need a monitor to tell me that. After struggling to fall asleep, I had been jarred awake by a severe calf cramp that brought Garrett in to help smooth out the muscles. I wonder now how they would be able to conclude anything about me based on such paltry sleep, much less than I normally have?

Some 368 minutes’ worth of data was collected, Hoffman tells me a few days later. In that time, 199 minutes of sleep were observed. That gives a “sleep efficiency” index of only about 54 percent: For an optimum study, a patient should be asleep at least 75 percent of the time after the lights go out. Although I had an inefficient night, Hoffman says, he was able to draw some significant conclusions.

Sensors recorded 14.5 “events” per hour, most of them obstructive apneas, meaning my air intake was blocked enough to briefly stop my breathing and awaken me. A normal number of such events is five or fewer, counting brief pauses and episodes of shallow breathing. The diagnosis: mild, bordering on moderate sleep apnea, with some risk of underestimation due to the inefficiency factor.

Hoffman recommends that I try out a CPAP machine. Although CPAP has been shown to be highly effective, some people find it hard to sleep while wearing the mask. I could also try a dental device or choose from at least four types of surgical remedies. Different doctors recommend different approaches. I think I’ll sleep on it.

Moffet is a writer based in Alexandria.