An article from 2018 by Frontiers in Psychology discusses how there is a lot of evidence showing that physical activity alters not only the brains structure but also its function in a positive way. The article Effects on Physical Exercise on Cognitive Functioning and Wellbeing: Biological and Psychological Benefits talks about how physical exercise "is a strong gene modulator that induces structural and functional changes in the brain, determining enormous benefit on both cognitive functioning and wellbeing".
If you are interested in reading more about physical exercise and its benefits on human wellbeing, click here.
Reference
Mandolesi, L., Polverino, A., Montuori, S., Foti, F., Ferraioli, G., Sorrentino, P., & Sorrentino, G. (2018). Effects on Physical Exercise on Cognitive Functioning and Wellbeing: Biological and Psychological Benefits. Frontiers in Psychology. https://doi.org/10.3389/fpsyg.2018.00509.