Almost every kind of fish is sometimes in a state of energy conservation, which we can call rest or even “sleep”, although this behavior may not be the same as the “sleep” of most land animals. Many fish (such as bass) sleep on or under logs at night. Corals are active during the day and rest in the cracks of the reef at night. Fish look very different at rest.
For example, many small carp that gather together during the day and are very active are scattered at night and do not move in shallow water. Some fish rest during the day and move at night; But almost all fish sleep. Other animals swim all the time, because they have to spit out water constantly to keep breathing; But they may still sleep during exercise, we just don’t know.