Insufficient sleep in school-aged children is common in modern society, with homework burden being a potential risk factor. The aim of this article is to explore the effect of sleep hygiene on the association between homework and sleep duration. Children filled out the Chinese version of the Adolescent Sleep Hygiene Scale, and parents filled out a sociodemographic questionnaire. The final sample included 363 boys and 371 girls with a mean age of 10.82 ± 0.38 years. Children with more homework went to bed later and slept less. Better sleep hygiene was associated with earlier bedtimes and longer sleep duration. Findings suggest that homework burden had a larger effect on sleep duration than sleep hygiene. Fifth-grade children in Shanghai have an excessive homework burden, which overwrites the benefit of sleep hygiene on sleep duration.