Actigraphy, a tool known for investigating sleep-wake patterns at home, lacks scientific validation in hypersomnolent subjects. We aim to validate an actigraphy-based sleep-wake prediction algorithm against 32-h continuous polysomnography in patients with suspected idiopathic hypersomnia, and to compare its performance to predict sleep-wake parameters assessed by polysomnography with those of a commercially available algorithm. Two hundred and six hypersomnolent subjects were included prospectively in a Reference Centre for Hypersomnias, and underwent a 32-h bedrest protocol, wearing wrist-actigraphy, to diagnose idiopathic hypersomnia. Among them, 126 patients (91 females, 30.6 ± 15.5 years, 101 idiopathic hypersomnia, 25 non-specified hypersomnia) with synchronised actigraphy and polysomnography were analysed. Age, sex, and Epworth Sleepiness Scale scores were collected. We trained various supervised algorithms and selected a recurrent neural network (S2S sequence-to-sequence long short-term memory network) for comparison with Actiwatch Software (AS) on sleep-wake variables and prediction errors during daytime and nighttime. S2S outperformed AS across all relevant metrics, and Bland-Altman analysis showed disagreement between the two algorithms. S2S had a lower absolute error than AS. AS mainly overestimated sleep, an overestimation that was substantially reduced with S2S, overall as well as during day and night. Performance was not correlated with age, sex, or subjective sleepiness, but objective sleepiness and longer sleep time on the bedrest were associated with sleep underestimation. Our S2S algorithm using deep learning performed better to predict sleep-wake parameters than AS and other commonly used algorithms. The next objective is to leverage this algorithm to study sleep-wake patterns in patients with hypersomnolence at home.