BackgroundThere is an ongoing debate about whether mental wellbeing follows a U-shaped pattern across the lifespan, with a universal low point during midlife. However, existing research largely looks at average distributions of mental health problems and does not consider the underlying trajectories and social determinants. We investigate the social factors linked to changes in mental health during midlife. MethodsFor this prospective observational study, we used representative data from the 1970 British Cohort Study for the ages 34, 42, and 46–48 years (N=8581, 51·5% female, 48·5% male; born in the same week in 1970) to identify participants with declining mental health in midlife, and then used logistic regressions to determine what social factors (eg, education and employment status) were associated with this decline. Mental health was measured using the short version of the Malaise Inventory (scored 0–9). Using the cutoff point of 4 (indicating high risk of depression), we categorised participants who changed from below the cutoff to above the cutoff from age 34 to 46 years as “declining mental health” (as opposed to “stable” and “improved” mental health who were grouped together into one category). All analyses controlled for sex and parental socioeconomic status. FindingsOf the participants who responded to all mental health questions, 5302 (82·2%) remained stable, 429 (6·7%) had improved, and 671 (10·5%) had declining mental health. Our logistic regressions show that university education was linked to a lower risk of declining mental health controlled for sex and parental socioeconomic status odds ratio [OR] 0·79, 95% CI 0·85–0·94; controlling for sex and parental socioeconomic status). Experiencing unemployment during this period was linked to a higher risk of declining mental health (OR 1·75, 1·24–2·42), whereas people with permanent or temporary sickness or disability were three times more likely to experience a deterioration of mental health compared with those in full-time employment (OR 3·12, 2·46–3·93). InterpretationThe midlife decline in mental health might not be a universal phenomenon, but it might rather be influenced by social factors and changes in people's lives. Individuals experiencing unemployment, particularly those excluded from the labour market, are at a considerably higher risk of experiencing a decline in mental health. This is study provides only descriptive evidence and should be followed up by causal analyses. FundingEconomic and Social Research Council (ESRC).