I don't know for sure, but I'll guess.
The EEG probe picks up low voltage, low frequency oscillations which are amplified, converted to digital, and fed into a microcontroller.
Standards have been agreed upon that define sleep stages by characteristic changes in these oscillations, and the microcontroller will compare what it's sensing against a reference to determine sleep stage.
From there it's standard microcontroller stuff (actually, the whole thing is pretty standard). The uC will handle datalogging, display, alarms, and other input as desired.