the reason a fishes gills open and close is they work like a pump pulling water through the mouth, over the gills out out the back. The constantly do this just like we breathe and do not have to keep moving. Only some of the Sharks, Rays and Skates have to keep moving, this is due to the fact that they only have gill slits not Gill plates like normal fish do.
So yes fish sleep, not in the same way you and I do but they do slow all their body functions down and will hover in the same place motionless. or lay in a crack in the rocks.
I have a tang that has scared me more than once when I have found it laying motionless in the middle of the tank at night when the lights are off. I like to look at my tank at night and imagine my surprise the first time I spotted it like that. I mean I held the light on it for quite some time and it just laid there. when I used the flashlight and tapped on the tank and it shot up off the bottom and hid behind the rocks.