Background and ObjectiveRetrospective data have linked adult physical activity (PA) to reduced risk of inflammatory bowel disease (IBD). We aimed to prospectively examine the association of PA and screen time (ST) in childhood with later risk of IBD, for which data are scarce.MethodsUsing two population‐based birth cohorts (All Babies in Southeast Sweden [ABIS] and Norwegian Mother, Father, and Child Cohort Study [MoBa]), we retrieved parent‐reported data on PA and ST degree at ages 3 and 8 years. Data were modelled as binary (high vs. low) and numerical (hours/day) exposures. Inflammatory bowel disease was defined as ≥2 diagnostic records in national health registers. Cox regression estimated hazard ratios adjusted for potential confounding from parental IBD, country of origin, education, and smoking habits (Adjusted hazard ratio (aHR)). Our 8‐year analyses included a 2‐year lag period to reduce the risk of reverse causation. Cohort‐specific estimates were pooled using random‐effects model.ResultAmong 65,978 participants from ABIS (n = 8810) and MoBa (n = 57,168) with available data, 266 developed IBD. At 3 years, children with high versus low PA had an aHR of 1.12 for IBD (95%CI = 0.87–1.43); high versus low ST showed an aHR of 0.91 (95%CI = 0.71–1.17). Conversely, at 8 years, high versus low ST was associated with increased risk of later IBD (aHR = 1.51; 95%CI = 1.02–2.25), but PA at 8 years, was not linked to IBD (aHR = 1.19; 95%CI = 0.80–1.76). Subtype‐specific analyses for Crohn's disease and ulcerative colitis did not differ appreciably.ConclusionAcknowledging possible confounding variables, children with high versus low ST at 8 years were at increased risk of IBD. In contrast, PA degree was not linked to IBD at any age category.