Read: Sleep deprivation in hospitals is a real problem

Toda began by looking for genes that, if switched on, would make flies sleepier. To that end, he worked with flies from 8,000 different strains that had each been engineered to activate a different gene when fed a triggering chemical. Toda placed these flies individually into tubes that were monitored with infrared beams. When awake and mobile, the insects regularly tripped the beams; when asleep and still, they did not. A computer monitored the entire captive swarm, recording their movements and noting any that were sleeping more than usual.

This monumental effort was successful—just. From 8,000 possible genes, Toda found only one that induced sleep. That was nemuri, which the team named after the Japanese word for sleep. It had never been thoroughly studied before. “When we first got it, we didn’t know what it was,” says Sehgal.

If flies are deprived of sleep, because the team was either regularly shaking their tubes or feeding them with caffeine, the nemuri gene becomes more active—but only in a single pair of neurons within the insects’ brains. When it whirs into action, it produces a protein (of the same name) that then acts on a fan-shaped part of the brain that’s known as a control center for sleep. If Toda switched nemuri on deliberately, flies slept 20 to 30 percent longer than normal peers. They slept more deeply, too: They were much less likely to wake up when their tubes were bumped, and the few that were roused were slow and sluggish.

“It’s very interesting work,” says Chiara Cirelli from the University of Wisconsin at Madison. She and others have identified genes in flies that are important for a good night’s rest and, when disabled, result in less sleep. But this is the first time anyone has done the reverse: increase the activity of a gene, and trigger more sleep.

“Until this study was conducted, relatively few somnogens were known,” says Susan Harbison from the National Institutes of Health. “This study also suggests that few such molecules may exist.” After all, if Toda tested 8,000 genes and found just one hit ... maybe there aren’t that many hits to find?

But there must be at least a few more, because nemuri can’t be the whole story. If it’s responsible for sending tired flies to sleep, then disabling it should disrupt sleep, says Cheryl van Buskirk at California State University at Northridge. And it didn’t. When Toda used the gene-editing technique called CRISPR to deactivate the gene, flies still slept, and for the usual amount of time. They were much easier to wake and took longer to nod off again. But “since sleep and sleep rebound are both largely intact, nemuri isn’t likely a major component of the sleep homeostat,” Van Buskirk says.

Sehgal thinks nemuri is probably a bit player when it comes to daily sleep, but becomes very important during times of stress, sleep deprivation, and sickness. Indeed, her team showed that the Nemuri protein is an antimicrobial peptide, or AMP—one of several small molecules that, as their name suggests, kill microbes.