These technicians monitor the brain's activity during sleep by attaching electrodes to the scalp.  A machine, called an electroencephalograph (EEG), records the brain activity during sleep.  Other tests monitor eye activity and can provide additional information about REM sleep. There are five stages of sleep.