To explored the impact of dexmedetomidine and esketamine in mitigating restlessness during the postoperative recovery phase following laparoscopic surgery in children. 102 individuals aged 1 to 7years experiencing laparoscopic surgery were randomly allocated into three groups, each accepting 1μg/kg of dexmedetomidine, 0.3mg/kg of esketamine, or saline immediately at the end of carbon dioxide pneumoperitoneum. Emergence agitation(EA) occurrence was assessed by PAED scale and 5-point agitation scale. Pain was judged using Face, Legs, Activity, Cry, and Consolability (FLACC) scale. The recovery time, extubation time, and post-anesthesia care unit (PACU) stay time were recorded for all three groups. Patients administered 1μg/kg of dexmedetomidine (8.8%) and individuals given 0.3mg/kg of esketamine (11.8%) showed lower incidences of emergence agitation compared to those receiving saline (35.5%; P = 0.009). There was no statistically significant difference in the time to discharge from the PACU among the three groups of patients (P > 0.05). The recovery time and extubation time were notably extended in the dexmedetomidine group (40.88 ± 12.95min, 42.50 ± 13.38min) when compared to the saline group (32.56 ± 13.05min, 33.29 ± 11.30min; P = 0.009, P = 0.010). Following CO2 pneumoperitoneum in pediatric laparoscopic surgeries, the intravenous administration of 1μg/kg dexmedetomidine or 0.3mg/kg esketamine effectively lowers EA occurrence without extending PACU time.