Although rectus sheath block (RSB) is routinely used in laparoscopic surgeries to reduce mid-abdominal pain, whether RSB should be performed before or after surgery remains unclear. Herein, the optimal timing for RSB in patients undergoing laparoscopic surgery was investigated. This retrospective cohort study analyzed the data of patients who underwent RSB during laparoscopic procedures at our hospital between January 2013 and December 2018. The primary outcome was the time to rescue analgesia within 24 hours postanesthesia. The patients were divided into preoperative (pre-) and postoperative (post-) RSB groups. A multivariable Cox proportional hazards regression model was used to analyze the time to rescue analgesia in the unmatched and propensity score (PS)-matched patient populations. In total, 609/14,284 patients were included (pre-RSB group, 227 patients; post-RSB group, 382 patients). After PS matching, 97 patients were assigned to both groups. Although the time from extubation to the first analgesic request was not significantly different between the 2 groups (322 vs 294 minutes, P = .57), the patients in the pre-RSB group showed a lower risk of postoperative first analgesic administration after PS matching (adjusted hazard ratio, 0.71; 95% confidence interval, 0.53–0.95; P = .023). Among patients undergoing laparoscopic surgery, those in the pre-RSB group tended to have a longer time to the first analgesic request and had a lower risk of analgesic administration within the first 24 hours than those in the post-RSB group. Thus, performing RSB preoperatively may be preferable.