Sleep disorder dramatically affects people's physical and mental health. Here, we investigated the effect of preoperative sleep disorders on anesthesia recovery and postoperative pain in patients undergoing laparoscopic gynecological surgery under general anesthesia. 120 patients who underwent elective laparoscopic gynecological surgery under general anesthesia in Taizhou Central Hospital from November 2021 to March 2022 were included. According to the score of the Pittsburgh sleep quality index (PSQI), the participating patients were divided into four groups: control group (control group), mild sleep disorder group A (group A), moderate sleep disorder group B (group B), and severe sleep disorder group C (group C), with 30 patients in each group. The changes of mean arterial pressure (MAP) and heart rate (HR) at different time points, operation time, anesthesia time, extubation time, the time when Aldrete score reached 10 points, visual analog score (VAS) serum interleukin-6 (IL-6), interleukin-10 (IL-10), and tumor necrosis factor- (TNF-) were compared among different groups. Our study demonstrated that there were no significant differences in MAP and HR among the four groups at the same time points (all > 0.05). Significant differences in the time of extubation and Aldrete score reaching 10 points had been found among the four groups (all < 0.001), indicating more sleep disorder induced longer extubation and recovery time. There were significant differences in VAS scores among the four groups at both different and the same time points (all < 0.001), suggesting more sleep disorders induced more pain in the sufferers. Serum IL-6 levels were significantly higher in the three sleep disorder groups than the control group at 6 h and 24 h after the operation (all < 0.05), while group C has the highest IL-6 levels as compared to the other group ( = 0.09 and < 0.001, respectively). At 6 h after operation, serum levels of TNF- in group C were significantly higher than in the control group ( = 0.044), but no significant differences were found in the other two groups (all > 0.05). Positive correlation with preoperative PSQI score has been found with the times of extubation, the time of Aldrete score reaching 10 points, the VAS at 1 h, 6 h, and 24 h after operation, the level of serum IL-6 at 1 day before operation and 6 h and 24 h after operation, and the TNF- at 6 h and 24 h after operation (all < 0.001). The present study showed that the degree of preoperative sleep disorders could affect the quality of postoperative awakening and pain of patients undergoing laparoscopic gynecological surgery under general anesthesia, which might be associated with the aggravation of inflammatory reactions in the body.