Background: Previous studies have shown that patients with long-term diabetes require more opioids after surgery than patients without diabetes. Gestational diabetes mellitus (GDM) normally only lasts for a brief period; nevertheless, its effect on sufentanil consumption after cesarean section is unknown. Methods: This prospective cohort study included two groups: a GDM group (n = 32) and a matched non-GDM (NGDM) group (n = 32). All patients underwent routine combined spinal-epidural anesthesia for cesarean delivery. Sufentanil consumption through an intravenous patient-controlled analgesia (PCA) pump, the frequency of PCA requests, and visual analog scale (VAS) scores 6 and 24 h after surgery were compared between groups. Results: Sufentanil consumption (μg) 6 h after surgery was higher in the GDM group than in the NGDM group (24.0 ± 6.6 vs 20.1 ± 5.7, P = 0.023). PCA was used more frequently 6 and 24 h after surgery by the GDM group than by the NGDM group (1[0-2] vs 0[0-1], P = 0.001; 6 [1-5] vs 3 [1, 2, 6-8], P = 0.001, respectively). The VAS score during activity 24 h after surgery was higher in the GDM group than in the NGDM group (5 [2, 3] vs 5 [1, 2], respectively, P = 0.03). Conclusion: Pregnant women with GDM require more opioids during the immediate postoperative period after cesarean section than those without GDM.