Sleep-wake stages discrimination is an important task in the study of cardiorespiratory diseases. Usually this is done by processing physiological signals such as electroencephalogram (EEG) that are, exclusively, recorded in hospitals using polysomnography (PSG) systems. In this paper, we report a simple automatic sleep-wake stages classifier using only RR series obtained from electrocardiogram (ECG). Seven features were extracted from the RR series by three methods, the heart rate variability (HRV), the detrended fluctuation analysis (DFA) and a proposed windowed detrended fluctuation analysis (WDFA). A subject-specific scheme was used where 20% of a subject's data was used to train the classifier and 80% for the classification. The method was tested on the MIT/BIH polysomnographic database (MITBPD) using support vector machine (SVM). Finally, the sleep efficiency Seff was calculated for evaluation of sleep condition.