Introduction: The COVID-19 lockdown has caused important changes in children’s routines, especially in terms of nutrition, physical activity, screen time, social activity, and school time. Regarding these changes, recent studies show that the COVID-19 lockdown is associated with higher levels of anxiety and depression in children. The objective of this study was to assess changes in sleep quality in Spanish children during the lockdown decreed by the Spanish government between March and June 2020. Methodology: We compared the BEAR (bedtime, excessive daytime sleepiness, awakening during the night, and regularity and duration of sleep) scores of 478 participants (median age = 7.5 years; 48% girls) in the SENDO project during the periods before, during, and after lockdown. The questionnaires were filled out by one of the parents. We used hierarchical models with two levels of clustering to account for the intra-cluster correlation between siblings. The interaction of time with a set of a priori selected variables was assessed by introducing the interaction term into the model and calculating the likelihood ratio test. Results: The mean scores in the BEAR questionnaire referred to the periods before, during, and after lockdown were 0.52 (sd 1.25), 1.43 (sd 1.99), and 1.07 (sd 1.55), respectively. These findings indicate a deterioration in sleep quality during the period of confinement. Parental level of education was found to be an effect modifier (pfor interaction = 0.004). Children whose parents had higher education (university graduates or higher) showed a smaller worsening than those without. Conclusion: Our study shows that the COVID-19 lockdown was associated with a significant worsening of sleep quality. Moreover, although the end of the lockdown brought about a slight improvement, mean scores on the BEAR scale remained significantly higher than before the lockdown, suggesting that the consequences for sleep quality could persist over time. This worsening was higher in children whose parents had lower educational degrees. Helping children maintain healthy sleeping habits despite the circumstances and providing early psychological support when needed is important to prevent negative psycho-physical symptoms due to lockdown that could persist over the years.