Discovering sleep in vertebrates and invertebrates alike has led scientists to conclude that it emerged very early in animal evolution -- perhaps 600 million years ago. "What we're doing in sleeping is a very old evolutionary phenomenon," Dr. Lima said.

Scientists have offered a number of ideas about the primordial function of sleep. Dr. Tononi believes that it originally evolved as a way to allow neurons to recover from a hard day of learning. "When you're awake you learn all the time, whether you know it or not," he said.

Learning strengthens some connections between neurons, known as synapses, and even forms new synapses. These synapses demand a lot of extra energy, though. "That means that at the end of the day, you have a brain that costs you more energy," Dr. Tononi said. "That's where sleep would kick in."

He argues that slow waves weaken synapses through the night. "If everything gets weaker, you still keep your memories, but overall the strength goes down," he said. "The next morning you gain in terms of energy and performance."

Dr. Tononi and his University of Wisconsin colleague, Dr. Chiara Cirelli, present this hypothesis in a paper to be published in the journal Sleep Medicine Reviews. Dr. Tononi believes it can be tested in the future, as scientists document sleep in other animal species. "It would be a very basic thing that would apply to any brain that can change," he said.

It has been almost 600 million years since human ancestors diverged from those of flies. As those ancestors evolved, their sleep evolved as well. Human sleep, for example, features not only slow-wave sleep, but bouts of sleep when the eyes make rapid movements and when we dream. Rapid eye movement, or REM sleep, as it is known, generally comes later in the night, after periods of intense slow-wave sleep.

Other mammals also experience a mix of REM and non-REM sleep, as do birds. Sleep researchers would like to know whether this pattern existed in the common ancestors of birds and mammals, reptilian animals that lived 310 million years ago. It is also possible that birds and mammals independently evolved this sleep pattern, just as birds and bats independently evolved wings.