Background In the UK, declining home ownership and delayed entry into the housing market have reshaped patterns of housing tenure (whether people own or rent their homes) across adulthood. Home ownership may reflect socioeconomic advantage, but may also provide greater housing security, stability and control, with implications for mental health. Using data from the 1970 British Cohort Study (BCS70), this study examines how home ownership trajectories, defined by whether, when and for how long individuals own their homes, are associated with mental health in midlife. Methods We analysed data from 8,016 BCS70 participants with information on housing tenure histories and mental health outcomes at age 51. Housing tenure was measured repeatedly from ages 26 to 46 and used to define prespecified patterns of home ownership across adulthood (referred to as ownership regimes), including sustained ownership and never owning. Mental health outcomes at age 51 were psychological distress and positive mental wellbeing. G-estimation of a structural nested mean model was used to estimate contrasts between these ownership regimes while accounting for time-varying confounding affected by prior exposure. Models were estimated in lavaan; non-response weights and full information maximum likelihood were used to address selective attrition and missing data. Results At age 51, 71% of participants owned their home (23% outright and 48% with a mortgage), while 24% were renting and 5% lived in other arrangements. Sustained home ownership across adulthood was associated with lower psychological distress at age 51 compared with never owning (ATE -0.21, 95% CI -0.47 to -0.03) and higher positive mental wellbeing (ATE 0.56 SD, 95% CI 0.38 to 0.67). In ownership-history regime contrasts, late ownership (first ownership in one's 40s) was associated with lower psychological distress than never owning (ATE -0.15, 95% CI -0.30 to -0.04), while the estimate for early ownership (first ownership in one's 30s) was in the same direction but imprecise (ATE -0.12, 95% CI -0.37 to 0.04). For wellbeing, both late and early ownership were associated with higher scores than never owning (ATE 0.17 SD, 95% CI 0.08 to 0.27 and ATE 0.40 SD, 95% CI 0.24 to 0.51, respectively), with the largest association observed for sustained ownership. Conclusion Home ownership across adulthood (age 26 to 46) was associated with better mental health in midlife (age 51) after accounting for time-varying socio-economic and health-related confounding. Findings suggest that both the timing and persistence of ownership may matter, particularly for positive mental wellbeing, with more sustained exposure to ownership associated with more favourable outcomes.