Background Abnormal durations of sleep have been associated with risk of diabetes. However, it is not clear if sleep duration is associated with diabetic retinopathy (DR). Methods In a cross-sectional study, we included 1,231 (Malay, n = 395; Indian, n = 836) adults (mean age 64.4 ± 9.0 years, 50.4% female) with diabetes from the second visit of two independent population-based cohort studies (2011–15) in Singapore. Self-reported habitual sleep duration was categorized as short (<6 h), normal (6 h <8), and long (8 h). Questionnaires were administered to detect risk of obstructive sleep apnea (OSA), excessive daytime sleepiness, and insomnia, all of which may indicate poor quality of sleep. The associations between sleep-related characteristics with moderate DR and vision-threatening DR (VTDR) were analysed using logistic regression models adjusted for potential confounders. Results Prevalence of moderate DR and VTDR in the study population were 10.5% and 6.3% respectively. The mean duration of sleep was 6.4 ± 1.5 h. Compared to normal sleep duration, both short and long sleep durations were associated with moderate DR with multivariable odds ratio (95% confidence interval) of 1.73 (1.03–2.89) and 2.17 (1.28–3.66) respectively. Long sleep duration (2.37 [1.16–4.89]), high risk of OSA (2.24 [1.09–4.75]), and excessive daytime sleepiness (3.27 [1.02–10.30]) were separately associated with VTDR. Conclusion Sleep duration had a U-shaped association with moderate DR; long sleep duration, excessive daytime sleepiness and high risk of OSA were positively associated with VTDR.