Abstract Background Mental illnesses (MI) constitute a growing public health problem, with reports of a higher prevalence among middle-aged adults (age effect), during specific periods such as economic crisis (period effect) and in recent birth cohorts (cohort effect). However, few studies have assessed whether these age-period-cohort (APC) effects were related to general population trends or if they are driven by changes in the mental health status of more vulnerable groups. Therefore, this study aimed to assess gender and educational differences underlying observed APC effects in the prevalence of MI in the Belgian adult population. Methods This study used data from six cross-sectional waves of the Belgian Health Interview Survey (1997-2018, ∼ 10,000 respondents per wave). Mental health was assessed using the 12-item General Health Questionnaire. Bayesian hierarchical APC models were applied on the prevalence of MI, taking into account gender and educational differences, as well as some potential confounding factors. Results Overall, this study confirmed the higher prevalence of MI in middle-aged adult, in 2013, and in more recent birth cohorts (1980-2000). Accounting for the interaction between gender and education, we found that the MI educational gradient was more pronounced for women than men. Finally, we found that APC trends were different between gender. The odds of having MI tended to be stable across age groups for women, while men showed an increased odds between 50-60 years and a decrease between 60-65 years. Regarding period and cohort effects, the increase odds in 2013 was mainly present in men, while the increase in recent birth cohorts was mainly present in women. Conclusions This study emphasizes that the age-period-cohort effects on mental health are different depending on gender and education, thus enriching our understanding on the underlying mechanisms to better guide future public (mental) health policies. Key messages • This study shows the importance of studying not only the overall trends in mental illness, but also the underlying differences in its distribution. • Insights into gender and educational differences in Age-Period-Cohort effects on mental health is crucial for the development of timely and efficient public health interventions.