Most all fish spend time in an energy-saving state that can be called “rest”, and we might even call their behavior “sleep”, though it is probably different than “sleep” in most land animals. Many fish, like Bass and perch, rest on or under logs at night. Coral reef fish active in the day, hide and rest in crevices and cracks in the reef to avoid being eaten at night.
The resting behavior of fish is very different from their behavior the rest of the day. Many minnows, for example, which are very active in schools during the day, scatter and remain motionless in shallow water at night. Many fish “rest” or “sleep” during the day and are active at night instead, but almost all fish sleep.
There are some animals that never stop swimming, like many species of shark, however, they HAVE to keep moving to push water through their mouths in order to breathe, and they may still sleep while moving, we just don’t know yet.