ImportanceSedentary behavior is associated with cardiometabolic disease and mortality, but its association with dementia is unclear.ObjectiveTo investigate whether accelerometer-assessed sedentary behavior is associated with incident dementia.Design, Setting, and ParticipantsA retrospective study of prospectively collected data from the UK Biobank including 49 841 adults aged 60 years or older without a diagnosis of dementia at the time of wearing the wrist accelerometer and living in England, Scotland, or Wales. Follow-up began at the time of wearing the accelerometer (February 2013 to December 2015) and continued until September 2021 in England, July 2021 in Scotland, and February 2018 in Wales.ExposuresMean daily sedentary behavior time (included in the primary analysis) and mean daily sedentary bout length, maximum daily sedentary bout length, and mean number of daily sedentary bouts (included in the secondary analyses) were derived from a machine learning–based analysis of 1 week of wrist-worn accelerometer data.Main Outcome and MeasuresIncident all-cause dementia diagnosis from inpatient hospital records and death registry data. Cox proportional hazard models with linear and cubic spline terms were used to assess associations.ResultsA total of 49 841 older adults (mean age, 67.19 [SD, 4.29] years; 54.7% were female) were followed up for a mean of 6.72 years (SD, 0.95 years). During this time, 414 individuals were diagnosed with incident all-cause dementia. In the fully adjusted models, there was a significant nonlinear association between time spent in sedentary behavior and incident dementia. Relative to a median of 9.27 hours/d for sedentary behavior, the hazard ratios (HRs) for dementia were 1.08 (95% CI, 1.04-1.12, P < .001) for 10 hours/d, 1.63 (95% CI, 1.35-1.97, P < .001) for 12 hours/d, and 3.21 (95% CI, 2.05-5.04, P < .001) for 15 hours/d. The adjusted incidence rate of dementia per 1000 person-years was 7.49 (95% CI, 7.48-7.49) for 9.27 hours/d of sedentary behavior, 8.06 (95% CI, 7.76-8.36) for 10 hours/d, 12.00 (95% CI, 10.00-14.36) for 12 hours/d, and 22.74 (95% CI, 14.92-34.11) for 15 hours/d. Mean daily sedentary bout length (HR, 1.53 [95% CI, 1.03-2.27], P = .04 and 0.65 [95% CI, 0.04-1.57] more dementia cases per 1000 person-years for a 1-hour increase from the mean of 0.48 hours) and maximum daily sedentary bout length (HR, 1.15 [95% CI, 1.02-1.31], P = .02 and 0.19 [95% CI, 0.02-0.38] more dementia cases per 1000 person-years for a 1-hour increase from the mean of 1.95 hours) were significantly associated with higher risk of incident dementia. The number of sedentary bouts per day was not associated with higher risk of incident dementia (HR, 1.00 [95% CI, 0.99-1.01], P = .89). In the sensitivity analyses, after adjustment for time spent in sedentary behavior, the mean daily sedentary bout length and the maximum daily sedentary bout length were no longer significantly associated with incident dementia.Conclusions and RelevanceAmong older adults, more time spent in sedentary behaviors was significantly associated with higher incidence of all-cause dementia. Future research is needed to determine whether the association between sedentary behavior and risk of dementia is causal.