ABSTRACT Aim: Type 2 diabetes mellitus (T2DM) is a common disease that imposes a substantial burden on the healthcare system and patients. Lifestyle modification such as sleep hygiene plays a crucial role in glycemic control. Sleep disorders impact many aspects of health. In this study, we aimed to investigate the correlation between sleep quality and glycemic control in T2DM. Method: This cross-sectional study was performed on 163 T2DM patients, attending Shahid Beheshti Hospital in Hamadan, Iran from March 2020 to 2021. Besides recording the demographic data and HbA1c level of participants, they were asked the Pittsburgh Sleep Quality Index questionnaire for evaluating sleep quality. We employed SPSS ver. 21 for data analysis and considered 0.05 as a significant level Results: Among all participants, 62 (38%) were female and 30.7% were illiterate. The mean age was 56.67 ± 12.90 years, and HbA1c was 9.03 ± 1.92 mg/dL. Among sleep metrics, mean waking time was 8.74 ± 1.74 hours, and average sleep time was 12.90 ± 4.90 hours. Overall, 58.2% of the participants had poor glycemic control and 44.8% were suffering from poor sleep quality. We found that patients with poor glycemic control exhibited significantly higher levels of sleep disturbances compared to those with good glycemic control (P < 0.001). Conclusion: Sleep quality is associated with glycemic control in patients with T2DM. Sleep disorders are common among diabetic patients. Thus, healthcare providers need to consider sleep quality improvement in their holistic approach to diabetes management.