1. For scientific and clinical requirements the present objective is a robust automatic online algorithm to detect rapid eye movement (REM) sleep from single channel sleep EEG data without using EMG or EOG information. 2. For data preprocessing 20 seconds time periods of the continuous EEG activity are digitally filtered in 7 frequency bands. Then the RMS values of these filtered signals are calculated along segments of 2.5 seconds. The resulting matrix of RMS values is representing information on the power of the signal localized in time and frequency and serves as input to an artificial neural network. A pooled set of EEG data together with the corresponding manual evaluation of the recordings was used in the training process. 3. Afterwards more than 90% of the time periods not belonging to the training set could be correctly labeled into REM and nonREM periods. In comparison to an older algorithm based on RMS values calculated along segments of 20 seconds, the error rate could be reduced by 20%.