Sleep disorders have increasingly impacted healthy lifestyles. Accurate scoring of sleep stages is crucial for diagnosing patients with sleep disorders. The precision of sleep staging differs notably between healthy individuals and those with sleep apnea (SA). SA disrupts the regularity of sleep stages, affecting the performance of sleep stage detection and influencing the accuracy of sleep staging, thereby impacting sleep quality assessment results. The study compares the accuracy of sleep staging between healthy individuals and SA patients using the same algorithm, revealing variations in performance based on different severities of sleep apnea. This suggests limitations in the generalization ability of current sleep staging methods. Accordingly, researchers are working to develop sleep staging methods that can diminish the impact of sleep apnea and exhibit better generalization capabilities. Furthermore, the study emphasizes the advantages of automated methods over manual scoring due to being less subjective and resource-intensive, making them more suitable for practical applications. The emphasis is on recent research findings on automatic sleep stage classification based on electroencephalography (EEG). The study outlines potential applications and distinctions of various algorithm models rooted in machine learning and deep learning within the context of sleep staging. These methods are applied to the well-known public EEG dataset Sleep-EDF. The study applies four widely studied algorithms to the single-channel EEG of 20 subjects, comparing the results of the models’ automatic sleep staging with the manual sleep staging annotations by clinical experts.