ObjectivesLong commuting times are linked to poor health outcomes, but the evidence is mainly cross-sectional. We examined longitudinal within-individual associations between commuting time and behaviour-related health.MethodsData were from the Swedish Longitudinal Occupational Survey of Health study. We selected workers who responded to a minimum of two surveys conducted every other year between 2008 and 2018. We included all study waves with self-reported commuting time (ie, the exposure, 1–5, 6–10, 11–15 or ≥15 hours/week), body mass index (based on weight and height), physical (in)activity, smoking, alcohol use and sleep problems (ie, the outcomes) (Nindividuals=20 376, Nobservations=46 169). We used conditional logistic regression for fixed effects analyses that controls for time-varying confounders by design. Analyses were stratified by working hours: normal (30–40 hours/week) or longer than normal (>40 hours/week) and adjusted for time dependent covariates: age, marital status, occupational position, presence of children, chronic disease, depressive symptoms, job strain and shift work.ResultsThose working >40 hours/week had higher odds of physical inactivity (OR 1.25, 95% CI 1.03 to 1.51) and sleep problems (OR 1.16, 95% CI 1.00 to 1.35) when they were commuting >5 hours/week than when they were commuting 1–5 hours/week. Among women working normal hours, longer commuting time associated with lower odds of problem drinking.ConclusionOur findings suggest that lengthy commuting time increases the risk of physical inactivity and sleep problems if individuals have longer than normal weekly working hours. Effects of work arrangements that decrease commuting time should be examined in relation to health behaviours.