Electroencephalography (EEG) continues to be a pivotal investigation in children with epilepsy, providing diagnostic evidence and supporting syndromic classification. In the pediatric population, electroencephalographic recordings are frequently performed during sleep, since this procedure reduces the number of artifacts and activates epileptiform abnormalities. To date, no shared guidelines are available for sleep induction in EEG. Among the interventions used in the clinical setting, melatonin and sleep deprivation represent the most used methods. The main purpose of this study is to test the non-inferiority of 3–5 mg melatonin versus sleep deprivation in achieving sleep in nap electroencephalography in children and young adult patients with epilepsy. To test non-inferiority, a randomized crossover trial is proposed where 30 patients will be randomized to receive 3–5 mg melatonin or sleep deprivation. Each enrolled subject will perform EEG recordings during sleep in the early afternoon for a total of 60 EEGs. In the melatonin group, the study drug will be administered a single oral dose 30 min prior to the EEG recording. In the sleep deprivation group, parents will be required to subject the child to sleep deprivation the night before registration. Urinary and salivary concentrations of melatonin and of its main metabolite 6-hydroxymelatonin will be determined by using a validated LC-MS method. The present protocol aims to offer a standardized protocol for sleep induction to be applied to EEG recordings in those of pediatric age. In addition, melatonin metabolism and elimination will be characterized and its potential interference in interictal abnormalities will be assessed.