Sleep is essential for physical and mental health. Polysomnography (PSG) procedures are labour-intensive time-consuming, making diagnosing sleep disorders difficult. Automatic staging using ML-based methods has been studied extensively, but frequently provides noisier predictions incompatible with typical manually annotated hypnograms. We propose an energy optimization method to improve the qua...