Background For students, sleep, sedentary behavior (SB), and physical activity (PA) all have a direct impact on overweight and obesity. However, out-of-school time SB, PA, and sleep have not been adequately studied for their effects on overweight and obesity. We aim to explore the correlations among PA, SB, sleep duration, and the likelihood of excess body weight in youth during out-of-school hours, focusing on dose-response relationships and isotemporal substitution effects. Methods This study conducted a cross-sectional analysis by employing data obtained from the China Health and Nutrition Survey, spanning from 2004 to 2015. Restricted cubic spline and isotemporal substitution model were used to assess the corresponding relationships. The weighted quantile sum regression was used to study how different behaviors contribute to the risk of excess body weight. Results There are linear dose-response relationships between sleep, SB, and moderate-to-vigorous physical activity (MVPA) during out-of-school hours and the risk of overweight and obesity in children and adolescents (all P for nonlinear > 0.05). Furthermore, screen-based SB shows a non-linear dose-response association with overweight/obesity. (P for nonlinear = 0.038). Theoretically, replacing 10 min of SB with an equal amount of sleep and PA could reduce the risk of overweight and obesity by 2.3-4.4%. Considering sleep, MVPA, and LPA during out-of-school time together, sleep contributed the most to overweight and obesity(weight = 0.6363). Conclusions During out-of-school time, SB demonstrated a cross-sectional dose-response association with a heightened likelihood of overweight and obesity in childhood. Conversely, sleep and MVPA displayed a contrasting dose-response association with overweight and obesity risk when compared to SB. Substituting SB with sleep or PA might potentially mitigate the risk of overweight and obesity.