The brain has a special circuit of nerve cells that are responsible for keeping you awake when you need to be. The finding paves the way for treatments for insomnia, oversleeping and conditions such as depression.

The nerve cells are called dorsal raphe nucleus neurons, or DRNDA neurones. They're dopamine neurons found in a little-studied part of the brain.

DRNDA cells are what help you wake up, even if you are very tired, when there's something urgent that needs to be done. For example, feeding a baby in the middle of the night or staying up to finish a deadline.

Scientists tested the activity of these neurones in mice, by looking at how they behaved when they were presented with a mating partner, a sudden unpleasant experience or food. The DRNDA cells were excited and active during these encounters.

Next, the activity of the mice's DRNDA cells while sleeping and waking were measured.

"These neurons are least active when the animal is sleeping and increase in activity as the animal is waking up," said Ryan Cho, a graduate student at Caltech and a study author.

Then they tested whether they could change how sleepy or alert the mice were by altering the cells. They engineered them to be activated by light. When light was shined on these mice while sleeping, they would wake up and remain awake.

When the cells were engineered to be under-active, the mice constantly fell asleep, even when they smelt a predator or a mating partner.

"These experiments showed us that DRNDA cells are necessary for full wakefulness in the face of important stimuli in mice," said Viviana Gradinaru, also of Caltech and a study author.

Sleep disorder treatments

Although the study was done in mice, in humans the DRNDA nerve cells are also linked to sleepiness.

"While [DRNDA neurons] have not been studied in depth, their degeneration has been correlated with excessive daytime sleepiness in patients with neurodegenerative disorders such as multiple systems atrophy and Lewy body dementia."

People who have damage to this brain region often experience extreme sleepiness in the daytime.

"Further work is necessary to establish causation in humans and to test the potential of the DRNDA as a therapeutic target for insomnia or oversleeping, and for sleep disturbances that accompany other psychiatric disorders such as depression, bipolar disorder and schizophrenia," said Gradinaru.

The research is published in a study in the journal Neuron.