It’s a common belief that humans and other animals sleep to give their brains a rest and recharge them for the next day. But that idea clashes with recent observations scientists have made of jellyfish in a sleep-like state because jellyfish do not have brains or a central nervous system.

A team of scientists watching upside-down jellyfish, which are formally known as Cassiopea, saw the marine creatures resting at night, finding that the jellyfish were less responsive to stimuli while in their apparent resting state. According to their study in the journal Current Biology, the researchers were able to track the sleep-like behavior because of another behavior: the jellyfish’s steady pulsing. The pulses quieted down at night, their volume reduced by about a third, although the dormant state was “rapidly reversible,” for instance when food was dropped into their tank.

“It’s like the odor of coffee permeating your consciousness in the morning,” study coauthor Paul Sternberg explained in a statement from the Howard Hughes Medical Institute.

But were the small jellyfish really sleeping? When humans don’t get enough sleep they can be groggy and sluggish, and the jellyfish were no different — ones deprived of their nighttime resting behavior “exhibited decreased activity and reduced responsiveness to a sensory stimulus during the subsequent day,” the study says. They were also slow to respond to stimuli in the middle of the night in cases when they were suddenly snapped out of their sleep. “Together, these results indicate that Cassiopea has a sleep-like state.”

That tells scientists something about when sleep evolved. Particularly this team asserts that sleep developed early in the animal lineage, before centralized nervous systems developed.

“It’s the first example of sleep in animals without a brain,” Sternberg said.

Vertebrates have all been found to sleep, as have other creatures like fruit flies and roundworms. The upside-down jellyfish, named for the position in which it lives and swims, is another on that list, adding a piece to the sleep puzzle as scientists try to understand how and why this behavior developed, whether it promotes cell health or specific functions like memory.

“We might seem extremely different from jellyfish, but we both exhibit a similar sleep state,” researcher Claire Bedbrook said in a statement from Caltech.

The scientists also noted that it goes beyond appearances; the underlying mechanisms for sleep within jellyfish are similar to those in humans. They saw this when they observed how jellyfish responded to melatonin, a hormone that promotes sleep in humans and other animals. The marine creatures responded in comparable ways.

Sternberg said the findings raised even more questions: “Do you need neurons to sleep? Do you need more than one cell to sleep?”

He hopes to study more creatures in the future to discover their sleeping habits, such as a sponge. If a sponge sleeps as well, that would mean the behavior emerged even earlier in evolution than the jellyfish finding suggests.

For one of the other researchers, Ravi Nath, another question that comes up is whether plants sleep as well.

“Jellyfish are the most evolutionarily ancient animals known to sleep,” Nath said. In a video about the research from Caltech, he explained that “sleep has an important and ancient function.”