Sleep isn’t the word I shoulda used they to varying degrees slow their activities and metabolism to rest. Some wedge into crevices or coral (like my foxface) or just hover at various levels in water ready to boogie if they sense trouble.In the wild none of the reef species sleep in the open. They are all in hiding somewhere. So it's probably a natural instinct as the lights go out no matter how or where they sleep.