Abstract An automatic method was developed for detecting sleep onset. Unintentional sleep onsets were studied during four separate Maintenance of Wakefulness Test (MWT) sessions of 272 subjects. The automatic method is based on two-channel electro-oculography (EOG) with left mastoid (M1) as reference. Synchronous electroencephalographic (EEG) activity of sleep stage 1 (S1) was detected by calculating cross correlation in 1.5-6 Hz band between two EOG channels. Beta power 18-30 Hz was used to exclude artefacts. Automatic estimation of slow eye movements (SEM) was used as the second criteria to separate S1 from wakefulness. The automatic scoring using only two EOG channels for the detection of unintentional sleep onset was compared to standard visual sleep scoring based on EOG, central and occipital EEG. The optimal detection thresholds were derived using 136 training subjects and then applied to different 136 validation subjects. Cohen's kappa between the visual and the new automatic scoring system in separating wakefulness and S1 was moderate (0.50) with epoch by epoch agreement of 97 %. The stage S1 epoch detection sensitivity was 56 % and specificity 98 %. Beside sleep onset detection, also micro sleep episodes could be estimated. The advantage of the automatic method is that it could be applied during online recordings using only four disposable self-adhesive electrodes.