Regular exercise can improve cognitive function.
This 2012 Canadian paper looked at a group of sedentary individuals and got the moving. 4 months of twice weekly exercise bike and intensive weight training made a difference. Cognitive function improved as well as their waist lines.
Exercise regularly. Not to the extreme of pounding your joints but enough to get heart rate up.