This study aimed to explore the effects of intravenous analgesia using tramadol on postoperative depression, anxiety, and sleep in women undergoing abdominal endoscopic surgery. Patients and Methods: Two hundred female patients (100 in each group) who underwent abdominal endoscopic surgery were recruited to randomly receive intravenous analgesia with sufentanil combined with tramadol (tramadol group) or sufentanil (control group). The primary outcome was the incidence of postoperative depression, which was assessed at 1, 2, and 3 days after surgery using the 13-item Beck Depression Inventory. The secondary outcomes were the incidence of anxiety and sleep quality, which were assessed using the 20-item Self-Rating Anxiety Scale and Richards-Campbell Sleep Questionnaire. Results: The incidence of depression (Beck depression scale≥4) during the 3-day follow-up in the control group was 51%, which was significantly higher than that in the tramadol group of 28% (relative risk [RR]=0.55; 95% confidence interval [CI], 0.38-0.79; P=0.001). No difference was found in the incidence of anxiety state (Self-Rating Anxiety Scale≥40) between the tramadol and control groups (7%vs 5%; RR=1.40; 95% CI, 0.46-4.25; P=0.552). All of the Richards-Campbell sleep scales of patients in the tramadol group at 1 (77.4±15.2 vs 64.2±20.1, P<0.001), 2 (84.1±14.9 vs 71.8±18.8, P<0.001), and 3 days (87.0±12.2 vs 70.3±21.0, P<0.001) after surgery were higher than those in the control group. Conclusion: Intravenous analgesia using tramadol can effectively improve the postoperative depression and sleep status of women undergoing abdominal endoscopic surgery. Tramadol is recommended for use in postoperative analgesia when improving postoperative mood, and sleep is needed in clinical practice.