Sleep deprivation, a common perioperative period health problem, causes ocular discomfort and affects postsurgical pain. However, the mechanism of sleep deprivation-induced increased pain sensitivity is elusive. This study aims to explore the role of ROS in sleep deprivation (SD)-induced hyperalgesia and the underlying mechanism. A 48-h continuous SD was performed prior to the hind paw incision pain modeling in mice. We measured ROS levels, microglial activation, DNA damage and protein levels of iNOS, NLRP3, p-P65 and P65 in mouse spinal dorsal cord. The involvement of ROS in SD-induced prolongation of postsurgical pain was further confirmed by intrathecal injection of ROS inhibitor, phenyl-N-tert-butylnitrone (PBN). Pretreatment of 48-h SD in mice significantly prolonged postsurgical pain recovery, manifesting as lowered paw withdrawal mechanical threshold and paw withdrawal thermal latency. It caused ROS increase and upregulation of iNOS on both Day 1 and 7 in mouse spinal dorsal cord. In addition, upregulation of NLRP3 and p-P65, microglial activation and DNA damage were observed in mice pretreated with 48-h SD prior to the incision. Notably, intrathecal injection of PBN significantly reversed the harmful effects of SD on postsurgical pain recovery, hyperalgesia, microglial activation and DNA damage via the NF-κB signaling pathway. Collectively, ROS increase is responsible for SD-induced hyperalgesia through activating microglial, triggering DNA damage and enhancing NLRP3 inflammasome activity in the spinal dorsal cord.