Electromyography (EMG) is used to measure muscle activity. Along with EEG and EOG, EMG is used to determine which stage of sleep a person is in. When various physiological measures are taken at the same time to assess sleep stage, this is called polysomnography.