While most fish rest by reducing their activity and metabolism, the way fish “sleep” is different from the way land mammals sleep.
Most fish don’t have eyelids, but they do have a regular period of reduced activity and metabolism. This doesn’t exactly serve the same purpose as a good night’s sleep for us, but research shows that fish sleep does serve a restorative purpose. Even though fish are in this restful state, many are still acutely alert for danger. I guess you could say that fish seep with one eye open. Some fish float in place while resting, some wedge themselves into a secure spot in the mud/coral, and some even locate a suitable makeshift nest. For example, some species of parrotfish actually make a “mosquito net” out of mucus to protect themselves from parasites so that they can sleep in peace.
A final interesting tidbit is The Spanish Hogfish sleeps so soundly that it can be lifted all the way to the surface before eliciting a response.