BackgroundDeterioration of sleep quality has been reported to contribute to the incidence of diabetes and may be responsible for glycemic status in diabetes. The present study explored the relationship between sleep quality and glycemic variability in patients with type 2 diabetes (T2D).MethodsWe recruited 111 patients with T2D for this cross-sectional study. Each patient underwent flash glucose monitoring for 14 days to obtain glycemic variability parameters, such as standard deviation of glucose (SD), coefficient of variation of glucose (CV), mean amplitude of glycemic excursions (MAGE), mean of daily differences (MODD), and time in glucose range of 3.9–10 mmol/L (TIR3.9–10). After 14 days of flash glucose monitoring, each patient received a questionnaire on the Pittsburgh Sleep Quality Index (PSQI) to evaluate subjective sleep quality. HbA1c was also collected to assess average glucose.ResultsHbA1c was comparable among the subgroups of PSQI score tertiles. Across ascending tertiles of PSQI scores, SD, CV and MAGE were increased, while TIR3.9–10 was decreased (p for trend < 0.05), but not MODD (p for trend = 0.090). Moreover, PSQI scores were positively correlated with SD, CV, MODD and MAGE (r = 0.322, 0.361, 0.308 and 0.354, respectively, p < 0.001) and were inversely correlated with TIR3.9–10 (r = − 0.386, p < 0.001). After adjusting for other relevant data by multivariate linear regression analyses, PSQI scores were independently responsible for SD (β = 0.251, t = 2.112, p = 0.041), CV (β = 0.286, t = 2.207, p = 0.033), MAGE (β = 0.323, t = 2.489, p = 0.018), and TIR3.9–10 (β = − 0.401, t = − 3.930, p < 0.001) but not for MODD (β = 0.188, t = 1.374, p = 0.177).ConclusionsIncreased glycemic variability assessed by flash glucose monitoring was closely associated with poor subjective sleep quality evaluated by the PSQI in patients with T2D.