There is limited research investigating the relationship between self-reported diabetes mellitus and subjective sleep patterns. Our study aims to explore this association by analyzing trends in a cohort study conducted in China using data from the China Health and Nutrition Survey longitudinal research (CHNS). We used multilevel logistic regression models to analyze the relationship. Our findings indicate that the prevalence of self- reported diabetes in China increased from 1.10% in 2004 to 3.36% in 2015, with an increase in the prevalence of short-term sleep from 7.03–10.24%. The prevalence of self-reported diabetes increased with increasing BMI levels (Normal and below: 0.67–2.16%, Overweight: 1.58–4.35%, Obesity: 2.68–6.57%, p < 0.01). The short-term sleep subgroup had the highest prevalence (2.14–5.64%). Additionally, we found significant associations between age, education level, ethnicity, coffee, smoking, drinking and the self-reported diabetes. Interestingly, the risk ratios for self-reported diabetes differed between sleep durations. With 6-8hours as the reference group, the risk ratios for self-reported diabetes in the short-term, and long-term sleep subgroups were 1.80 (95% CI: 1.23–2.63), and 1.41 (95%CI: 1.01–1.96), respectively. Raising awareness about the impact of irregular sleep duration on diabetes risk is essential, and these initiatives may serve as effective policies for diabetes control.