Aquarium fish benefit from a normal day-night rhythm and should have several hours of darkness each night. Continuous light can disrupt resting behaviour and also encourages algae. Use a timer to switch the aquarium light off at a consistent time. Blue 'moonlight' modes are best used briefly for viewing rather than left on all night.
Fish do not close their eyes like people do, but they still show daily activity and rest patterns influenced by light and darkness.

Darkness supports normal behaviour
Many fish become less active, seek cover or change position after lights-out. Nocturnal species may become more active in the dark.
A predictable schedule allows those patterns to occur consistently.
Plants need a dark period too
Aquatic plants switch from daytime photosynthesis to respiration in darkness. Leaving lights on constantly does not create unlimited growth and can destabilise the tank-light balance.
Aquarium Co-Op advises against leaving even blue moonlight on all night.
Use a timer
A timer removes guesswork and keeps day length consistent. This is especially useful if your own bedtime changes from day to day.
You can set the light period around the hours when you are home to enjoy the tank.
Room light counts too
A tank in a brightly lit room may receive ambient light before and after the aquarium fixture runs. Avoid placing the aquarium where strong direct sun effectively lengthens the photoperiod.
Full darkness is not always necessary, but a genuinely dim night period is.
Avoid sudden startling where possible
Fish may be startled when a very bright light switches on in a completely dark room. Ambient room light before the aquarium light or a gradual dimming feature can soften the transition.
Frequently asked questions
How many hours of darkness do fish need?
There is no one figure for every species, but a normal overnight dark period after a sensible 6–12 hour daytime photoperiod is appropriate for most aquariums.
Can I leave blue LEDs on all night?
It is better not to. Use them briefly for viewing, then provide darkness.
Do fish sleep?
Fish have rest states even though they do not sleep exactly like humans; light-dark cycles help regulate those patterns.
Sources and further reading
This guide separates general aquarium arithmetic from fish-welfare decisions. For species-specific limits, always check the needs of the fish you intend to keep.