Abstract Introduction Refractive errors are very common, in particular in children and adolescents, leading to global health issues, academic implications and economic costs. The process of emmetropization in child development is a multifactorial and active mechanism, and is yet to be fully understood. Light exposure and endogenous circadian rhythmicity are thought to have an important role in this process. They are also known to be both cause and consequence of various sleep habits. The study aims at investigating the role of sleep duration and timing in refractive error development of preschoolers. Methods Sleep duration and timing were assessed at age 2 and 5 years, and vision problems at age 5 through parental auto-questionnaires in 1,130 children from the EDEN birth-cohort. We performed both cross-sectional and longitudinal analyses using logistic regression models, before and after adjusting for age, sex, socio-economic status, nap duration, time spent outdoors and daily screen-time. We conducted multiple imputations to deal with missing data on covariates. The shape of the association was considered by splitting sleep duration into tertiles. Results At age 5 years, 20.4% of the children were prescribed glasses (2% for myopia, 11.9% for hyperopia and 6.8% for unknow reason). Children slept on average (SD) 11h05 (30 min) per night at age 2 and 10h49 (48 min) at age 5. Average bedtime and midsleep were 8.36 pm (30 min), 2.06 am (36 min), and 8.54 pm (30 min), 2.06 am (24 min) at age 2 and 5, respectively. In the raw longitudinal analysis, a U-shaped association was observed between nocturnal sleep duration at age 2 and eyeglass prescription at age 5: 2-years-old children sleeping 11h30 had a higher risk to have an eyeglass prescription by the age of 5. Later midsleep and bedtime at age 2 were associated with an increased risk of eyeglass prescription at age 5. All associations, except the one concerning bedtime, were barely changed after adjustment while becoming borderline significant. Conclusion Duration and timing of sleep at age 2 were associated with subsequent onset of refractive errors in preschoolers from a general population. Sleep and light hygiene might be targets for prevention. Support (if any):