Importance The benefit of physical activity (PA) for increasing longevity is well–established, however, the impact of diurnal timing of PA on mortality remains poorly understood. Objective To derive PA patterns and investigate their associations with all–cause mortality. Design, Setting, and Participants This population-based prospective cohort study analyzed UK Biobank baseline data collected between 2006 and 2010 from adults aged 40 to 79 years in England, Scotland, and Wales. Participants were invited by email to participate in an additional accelerometer study from 2013 to 2015, 7 years (median) after baseline. Participants' vital status was assessed via linkage with mortality registries through September 2021 (England/Wales) and October 2021 (Scotland). Data analyses were performed in July 2022. Exposure Loading scores of functional principal components (fPCs) obtained from wrist accelerometer-measured activity metrics. The 'Euclidean norm minus one' was used as a summary metric of bodily acceleration aggregated to 24 hourly averages across seven days. These timeseries were used for functional principal component analysis (fPCA). Main Outcomes and Measures Examination of time–dependent PA patterns obtained using functional principal component analysis in relation to all–cause mortality estimated by multivariable Cox proportional hazard models. Results Among 96,361 participants (56% female), 2,849 deaths occurred during 6.9 (SD 0.9) years of follow–up. Four distinct functional principal components (fPCs) accounted for 96% of the variation of the accelerometry data. The association of fPC1 and mortality was non–linear (p<0.001). Using a loading score of zero as the reference, a fPC1 score of +2 (high overall PA) was associated with lower mortality (0.91; 95% CI: 0.84–0.99), whereas a score of +1 showed no relation (0.94; 95% CI: 0.89–1.00). A fPC1 score of –2 (low overall PA) was associated with higher mortality (1.71; 95% CI: 1.58–1.84), as was a score of –1 (1.20; 95% CI: 1.13–1.26). A 1–unit score increase on fPC2 (high early day PA) was not associated with mortality (0.97; 95% CI: 0.93–1.02). For fPC3, a 1–unit score increase (high midday PA) was associated with decreased mortality (0.88; 95% CI: 0.84–0.94). In contrast, a 1–unit score increase on fPC4 (high midday and nocturnal PA) was associated with higher mortality (1.14; 95% CI: 1.06–1.24). Conclusions and Relevance Higher risks of death were found for patterns denoting lower overall PA and higher late day and nocturnal PA. Conversely, higher levels of PA, distributed continuously, in one, or in two activity peaks during daytime, were inversely associated with lower mortality. Daily timing of PA may have public health implications, as our results suggest that some level of elevated PA during the day and a nighttime rest is associated with longevity.