This study examined the mediating role of sleep in the relationship between physical activity and executive function in children with attention deficit hyperactivity disorder (ADHD). Fifty-six children with ADHD were recruited from Shenzhen Children's Hospital. Participants wore an accelerometer for seven consecutive days to measure physical activity and sleep quality. Activity counts were analyzed to measure moderate-to-vigorous physical activity (MVPA). Four sleep parameters, including sleep latency (SL), sleep efficiency, total sleep time, and wake after sleep onset were recorded from the actigraph. Three core executive functions, inhibitory control; working memory (WM); and cognitive flexibility (CF), were assessed from computer-based tasks: the flanker task, and the Tower of London and Trail Making Tests, respectively. The regression results showed that MVPA was negatively associated with SL (−0.169; 95%CI [−0.244, −0.112]). WM (total scores) was positively related to MVPA (0.028, 95%CI [0.008, 0.048]), but negatively related to SL (−0.105, 95%CI [−0.167, −0.030]). CF (part B errors) was negatively associated with MVPA (−0.031, 95%CI [−0.055, −0.005]) and positively correlated with SL (0.184, 95%CI [0.092, −0.260]). The indirect effect of SL was found for MVPA and WM (0.018, 95%CI [0.015, 0.034]), supporting the indirect partial mediation. Similarly, the indirect effect of SL was found between MVPA and CF (−0.031, 95%CI [−0.060, −0.012]), supporting the indirect partial mediation. The mediating role of SL in children with ADHD suggests that the intensity of physical activity plays a key role in linking sleep quality and executive function in this group.