(a) The experiment consisted of two nights: an adaptation and an experimental night. On both nights, participants were wired up for polysomnography (PSG) and we recorded brain activity throughout the night. In both nights, tones were presented during rapid eye movement (REM) sleep. However, prior to the experimental night, participants completed training on the serial reaction time task (SRTT), and then performed an imagery task in which they were cued with pictures and sounds, but only imagine performing the finger tapping (without movement). PSG was recorded throughout these tasks. After waking up, from the experimental night, participants completed the motor imagery and the SRTT again, and finally did the explicit recall task. (b) In the SRTT, images were presented in two different sequences each with a different set of tones. Each image was associated with a unique tone and required a specific button press. In the imagery task, participants heard the tones and saw the images as in the SRTT, but only imagined pressing the buttons. This imagery data was used for classification, as it has cleaner signals compared to SRTT since there are no movement artefacts. (c) The sounds of only one learned sequence (cued sequence) were played during REM sleep to trigger the associated memories of left- and right-hand presses. (d) Participants were asked to mark the order of each sequence on paper as accurately as they could remember during the explicit recall test after sleep.