Fish don't sleep the same way that you, your dog — or any mammal for that matter — does. Most don't experience REM cycles (though research on zebra fish suggests they have similar brain activity to rapid eye movement (REM) sleep).
Still, scientists have observed that many species of fish rest. This is a period of restoration when their metabolic functions slow and they are less active.
Some fish, like reef sharks, lay still at the bottom of the ocean or inside caves when they sleep. These sharks have a unique anatomical feature called a spiracle that forces water out of the shark's gills so they can continue to breathe.
Some species of sharks and tuna must keep swimming to breathe because they don't have spiracles to keep water flowing over their gills. In their cases, scientists hypothesize that they shut off half of their brains like dolphins do. They slow their breathing and move more slowly but are still somewhat responsive to their environment.