In a somewhat surprising phenomenon, measuring pupil size can be used to objectively identify sleepiness and the degree of sleep deprivation. The measurement, called pupillometry, is often used in research and consists of measuring the size of the pupil, which is the central black part of the eye. Not only the size, but how the pupil changes, can be meaningful.
Pupil size is determined by input from the nervous system acting on the muscles affecting the colored part of the eye called the iris. During periods of rest, or conversely during periods of activity and arousal, these influences will change. For example, if you are active, your sympathetic nervous system will take over and your pupils will dilate, allowing more information to be taken in. If you are about to be eaten by a lion, this system allows you to better spot it before it leaps on you. The complementary parasympathetic nervous system will take over during periods of rest and relaxation, causing pupils to return to their default state and become smaller.
Research has shown that there is a strong relationship between sleep deprivation, pupil size, and pupil stability. A well-rested individual can maintain constant pupil size in darkness for 15 minutes. As you become more sleep deprived, your pupil size will become less stable. It fluctuates (or oscillates) becoming subtly bigger and smaller rather than maintaining its size. Moreover, your pupils overall size will shrink, perhaps reflecting fatigue in the task of maintaining the larger size. Therefore, both pupil size and stability can objectively identify sleepiness and sleep deprivation. Pupillometry is not widely used, however, as it is mostly a research tool with the equipment not available much beyond this setting.
Lowenstein, O et al. "Pupillary movements during acute and chronic fatigue: a new test for the objective evaluation of tiredness." Invest Opthalmo 1963;2:138.
Wilhelm, B et al. "Pupillographic assessment of sleepiness in sleep-deprived healthy subjects." Sleep 1998;21:258.
Yoss, R et al. "Pupil size and spontaneous pupillary waves associated with alertness, drowsiness and sleep." Neurology 1970;20:545.