BackgroundThis study aims to investigate the trends and ecological determinants of physical activity among U.S. children and adolescents during the 2019–2021 period, encompassing the COVID-19 pandemic’s onset and subsequent years.MethodsUtilizing data from the National Survey of Children’s Health over three years, this cohort study analyzed physical activity levels and ecological determinants among 82,068 participants aged 6–17. The sample included 36,133 children (44%) and 45,935 adolescents (56%), with variables assessed by caregiver reports.ResultsThe analysis revealed a significant decline in physical activity among children from 2019 to 2020, followed by a recovery in 2021, whereas adolescents showed a continued decrease without recovery. Over the study period, children were consistently more active than adolescents. Better health status, normal weight, less screen time, stronger peer relationships, higher parental involvement, better family resilience and greater school participation were consistently correlated with increased physical activity in both age groups. Sleep duration was a predictor of activity only in children, while mental health status was solely a predictor in adolescents. Neighborhood environment consistently predicted children’s activity levels but was a significant factor for adolescents only in 2020.ConclusionsThese findings highlight the differing impacts of the pandemic on physical activity between children and adolescents, emphasizing the need for targeted public health interventions, particularly for adolescents whose activity levels have not recovered from the pandemic period. Age-specific physical activity interventions should consider sleep duration and neighborhood environmental factors when targeting children and mental health factors when focused on adolescents.