Fish do not have eyelids so they sleep with their eyes open. They often retreat to shelter, such as a plant thicket or near a piece of sunken wood. Many fish also will change color, the colors possibly becoming muted or darker. In the aquarium some just settle near the bottom of the aquarium. Diurnal fish, meaning fish that are active during the day, will sleep as long as it is dark. On the reef, some parrotfish retreat to a crevice and secrete a mucous cocoon. Some think that the cocoon helps block some of their scent while they sleep. Some wrasses dive into the sand and bury themselves while they sleep. It is unclear if pelagic fish such as sharks, tuna or sailfish sleep. They appear to be unable to survive if they stop swimming but I don’t know if their brains have been studied.
We have studied the brains of whales while they sleep and the results are very interesting. Whales need to breathe from the surface, so their brains can’t shut down the way other mammals brains do. They also need to consciously decide when to breathe and when to keep their blow hole closed. When we are in REM sleep, which is also when we dream, our voluntary muscles typically go into a temporary paralysis, presumably to keep us from injuring ourselves. This would be fatal in whales. Whales have the ability to shut down half of their brain at a time while retaining enough consciousness to control breathing.
We don’t know if pelagic fish can shut down part of their brain, or if they even need to sleep at all. We know most mammals need sleep and need REM sleep to survive. We know birds sleep and believe that they dream. We don’t know if reptiles, amphibians and fish dream, although all have much simpler brains.
You can tell that fish sleep by turning on the aquarium light or diving at night. The fish will be generally unresponsive to stimuli and can be easily caught or handled. I have used this to advantage when I have needed to remove fish from an aquarium with a lot of rocks. During the day, they can easily hide in the rocks, but at night you have a minute or two to catch fish before they wake up. Sometimes you can save yourself having to tear the tank apart to catch certain fish.
If fish don’t need to sleep or dream, why do it? We don’t know, but it may be an energy saving technique. Many fish are nocturnal, especially catfish and “electric” fish. These fish often have long whiskers or produce an electric field for navigation (momyrids and knife fishes). Other nocturnal fish have very large eyes, but many fish can’t see at night. Sleeping may save energy when fish are unable to move around anyway. Nocturnal fish may sleep during the day, but don’t appear to shut down as much as diurnal fish do at night.