Yes, fish do sleep and they do this with their eyes open
simply because they have no eyelids. Aside from this, a fish's eye works in
exactly the same way as for other animals i.e. has a contractible iris, a pupil
to allow light to enter the eyeball etc. However, a fish's cornea has no
function as a lens; the refractive index is too similar to that of water.
Instead, the lens itself, has a high refractive index and functions as the
single focusing element of the eye. Unlike the lens in a human eye, a fishes
lens is spherical and cannot flex to focus. Instead the lens moves closer or
further from the retina in a similar manner to a camera lens.
As fish do not have necks, they cannot turn their head to look
in different directions. To compensate for this, their eyes have a wide field
of view. Depending on the placement of the eye, some fish, particularly those
that are preyed on, have 360 degree vision.
Fish can recognise colours and patterns. This is most obvious
in the cichlid world where colours and patterns are used to communicate,
identify species (for defence of the brood), to indicate breeding status and
for camouflage.
The size of the eye depends largely on environmental or
behavioral conditions. If the fish is active at night, lives in murky waters or
is usually considered as prey the eyes will tend to be larger.