Meir Kryger, who tells the story of Joe in his book, has been working since the nineteen-seventies on a related condition, sleep apnea, in which a person’s airway closes during sleep, breathing stops, and, starved for air, the person awakens. Apnea can lead to heart attack and stroke from decreased oxygen, and may accelerate cognitive decline in older people. Kryger writes that there are descriptions of sleep apnea that predate Dickens’s Joe. Dionysius, a tyrant who ruled the Cretan kingdom of Heraclea in the fourth century B.C., was massively overweight. Because he repeatedly fell asleep, Dionysius hired people to poke him with long, thin needles, probably to keep him breathing. Sleep apnea was once thought to be rare, but, now that there are sophisticated diagnostic tools to measure respiration and muscle contractions, it is known to afflict some two to three per cent of the U.S. population—five million men and two and a half million women. That makes it as prevalent as mental illness, and not all sufferers are obese.

The early apnea studies pioneered by Kryger and others showed that it damaged vital organs, and this work became a catalyst for medicine’s serious examination of sleep. Once it had been demonstrated that certain conditions associated with disrupted sleep could have dire clinical consequences, it became clear that sleep was a crucial factor in maintaining good health. The technology of the sleep laboratory provided insights into how other disorders can disrupt sleep, including Parkinson’s disease, esophageal reflux, hormonal dysfunction of the thyroid and pituitary glands, and traumatic brain injury. Where doctors had previously ascribed poor nighttime sleep to anxiety and daytime sleepiness to laziness or lack of motivation, they now began to view them as conditions worthy of diagnosis and treatment.

Kryger’s book usefully outlines the current state of knowledge of sleep science in humans. The biology of sleep and wakefulness is complex, involving not just the one neural circuit I learned about in medical school but numerous pathways in the brain and countless chemical mediators. Kryger condenses this intricate neuroscience to explain the mechanisms that start and stop sleep: “a wake gauge and a body clock.” Just as a car’s fuel gauge tells us when we need to refill the tank, a “wake gauge” tells us when our body is in need of sleep. The gauge begins to signal after we have been awake for about fourteen hours, and increases in intensity until the eighteen-hour mark, after which we find it hard not to fall asleep. The wake gauge operates in the brain by means of a chemical called adenosine, which is involved in energy transfer. The longer our brain is active, the more adenosine accumulates and the sleepier we feel. (The reason coffee keeps us up is that caffeine counteracts the effects of adenosine.)

The body clock synchronizes our need for sleep with the rhythms of the world around us. Daylight is the primary regulator. When light hits the eye’s retina, a wake-up signal is sent to a collection of cells in the suprachiasmatic nucleus of the brain, which keep time and monitor our sleep-wake cycle. At dusk, when light fades, the pineal gland (where Descartes believed the soul resided) releases melatonin and makes us drowsy. Melatonin regulates the circadian rhythm of a wide range of organisms; the molecule is found in bacteria, insects, jellyfish, and plants. The visual basis of human circadian rhythms is proved by the fact that people who are blind because of damage to the eye itself often have great difficulty synchronizing their body clocks, and suffer severe sleep problems, whereas people whose blindness is caused by lesions in the visual cortex (and whose eyes are undamaged) generally have a normal circadian system.

Once we’ve finally nodded off, a variety of things occur. By tracking eye movements and using electroencephalograms to measure brain waves, researchers have identified four main types of sleep and have established that we typically progress through them in cycles of about ninety minutes. The first two stages move toward so-called “slow-wave” sleep, a state during which our neocortex powers down and which is thought to be largely responsible for the feeling of being refreshed when we wake. As we come out of slow-wave sleep, we go through a period of rapid-eye-movement sleep, or REM, one of the most commonly studied phases. Kryger calls REM the “enigmatic state.” During this phase, almost all of our muscles are paralyzed, except the diaphragm, which allows us to continue to breathe, and certain sphincters at the top and bottom of our gastrointestinal tract. Meanwhile, the brain shoots off “electrical storms,” resulting in rapid movements of the eyes, and we start to have vivid dreams. All humans dream, usually three to five times a night. And every time a man dreams he has an erection; every time a woman dreams, the blood vessels of her vagina become engorged. These changes in our genitalia are apparently unrelated to sexual thoughts before sleep or to sexual content in the dreams themselves. Rather, erections and vaginal engorgement seem to be the result of the state of dreaming itself.

Even as we cycle through the various stages, our sleep is frequently interrupted by brief awakenings, called “arousals,” each lasting only seconds. Kryger writes that “healthy sleepers” typically experience about five awakenings an hour, although they do not remember them. Scientists speculate that these brief periods of wakefulness might have evolved so that we do not place ourselves in danger while asleep—suffocating under bedding, for example, or being vulnerable to attack by a predator.

Kryger offers a comprehensive analysis of physical conditions that can impair our sleep. Women may experience insomnia owing to the normal hormonal fluctuations of the menstrual cycle and to the changes in hormonal regulation that occur with menopause. (He is rightly cautious about whether so-called “andropause,” a decline in testosterone levels among one to two per cent of men as they age, also contributes to insomnia.) Restless-leg syndrome, which causes lower limbs to spontaneously move and often cramp, is associated with certain vitamin deficiencies but often occurs without a known reason. It is a common cause of disturbed sleep in the elderly, and treatment varies from replenishing the deficient vitamin to prescribing drugs that alter neurotransmitters in the brain.

But for most of us it is the mind, rather than the body, that disrupts restorative sleep. Kryger explores in depth psychological conditions that are associated with disordered sleep, as well as psychotropic medications whose side effects can prevent a restful night. He allows for the need to medicate at times with sleeping pills or melatonin, but prefers cognitive behavioral therapy, a technique that involves teaching patients to mentally prepare themselves for slumber by devising ways to bypass the thoughts that keep them awake.

There is useful advice for less chronic problems, like jet lag. Kryger explains the difference between flying east and flying west. If you take a morning flight from London to New York, you’ll most likely arrive in the afternoon, but your body thinks it’s night. He recommends avoiding sleep for more than a short nap. Instead, eat, watch movies, and, upon arrival, try to stay awake until it’s bedtime in the new location. When flying east, he recommends getting as much sleep as possible—asking the flight attendants not to interrupt you, and using earplugs and an eye mask. He offers other tips, such as shielding your eyes from sunlight until your body would normally awaken by wearing sunglasses for about two hours after landing: this helps reset the body’s clock.

The mysteries that surround sleep are not merely scientific and clinical but also cultural. In “Wild Nights” (Basic), Benjamin Reiss, a professor of English at Emory University, writes: