Background The hearing function at a given age seems to have improved in more recent born cohorts in industrialized countries. But the reasons for the improvement have not yet been explained. Methods We investigated the extent to which better hearing in Norway is attributed to modifiable risk factors by using representative demographic and audiometric data from two cohorts of the Trøndelag Health Study, HUNT2 (1996–1998) and HUNT4 (2017–2019). We estimated natural indirect effects using causal inference methods in order to assess whether cohort improvement in hearing thresholds (HTs) was mediated by occupational noise exposure, recurrent ear infections, smoking and education. Results The improvement in HTs from HUNT2 to HUNT4 was 2.8 and 3.0 dB at low respectively high frequencies. Together all risk factors mediated this improvement by 0.8 dB (95% CI 0.7–0.9) and 0.8 dB (95% CI 0.7–0.9) respectively, corresponding to mediated proportions of 27 and 28%. Substantial mediation was specifically found for occupational noise in men and recurrent ear infections in women (mediated proportions of 11 and 17% at high frequencies, respectively). Conclusions Increased education, less occupational noise exposure, ear infections and smoking contributed considerably to better hearing in Norway the last two decades.