They never fully sleep.
Yep, that’s right.
Think about it: what would you do if you lived in the water and were tired? Maybe you’d flop belly up, and hang onto something. But what if you were alone, or didn’t have any appendage to hang onto stuff with? What if you were scared of predators sneaking up on you while you floated along the soothing current? Or wouldn’t you be afraid of sinking to the bottom and drowning before you woke up?

A pod of Pilot whales off the coast of Tenerife, Canary Islands. These dolphins were definitely sleeping – floating on the surface and breathing at long intervals.
Cetaceans have solved the problem. They sleep with only half of their brain, usually in two long sessions of 8 hours. Or they take naps, but always only with one side of their brain! They still have enough consciousness to swim, breathe and be on the lookout for unfriendly beasts like sharks, other marine mammals and humans.

A Bottlenose Dolphin at a park in Italy. One eyes open and one closed, it was definitely “sleepswimming”
Manatees and Dugongs, just in case you were wondering, adopt more or less the same strategy when sleeping, except they sleep for shorter lengths of time and don’t swim – they lean on the sea bed and sleep with both eyes nearly closed, then go to the surface in a “sleepwalking” state to breathe and look around every 5-20 minutes. They probably evolved to rest on the bottom unlike cetaceans because they usually live in very shallow waters, so aren’t that far from the sea bed anyhow … and it’s more comfortable!