The truth is, there’s no single “miracle cure” for memory problems or other brain changes that come with aging. But there is cause for optimism. Science points to a combination of social factors and healthy habits that—taken together—can help you build, preserve, and protect your brain’s function over time.

Preventing memory loss

Experts used to think brain development peaked in late adolescence and it was all downhill from there. They believed if a person lost brain cells due to problems like a head injury, stroke, or substance abuse, nothing could be done to restore memory and brain function. Now, thanks to discoveries in neuroscience, we know that the brain can grow new cells and form new neural connections. Like our muscles and other body parts, the brain can rebuild itself through repeated use and exercise.

This is great news for people who intend to live a long time. It means we can prevent memory loss by focusing on mental, physical, and social activities that promote healthy brain development. Even people with Alzheimer’s disease and other dementias can benefit from a healthy lifestyle.

It may help to think about your brain as a reservoir, gathering rainfall for use over time. The process starts before birth as the brain begins to develop, collecting “reserves” to spend later on. The exchange continues throughout life, as your brain responds to your experiences and environment.

How to keep your brain healthy as you age

Here are some tips for filling—and not draining—your reservoir of brain power:

1. Exercise regularly.Daily physical exercise has been shown to prevent or postpone your risk for Alzheimer’s disease and other dementias. As little as 15 to 30 minutes a day can make a difference.

2. If you smoke, quit. Tobacco use can harm all your organs, including your brain. But stopping now improves your chances for healthier brain function in the future, even if you’ve smoked for many years.

3. Take care of your heart. A healthy brain requires a good cardiovascular system. If you have high blood pressure, high cholesterol, diabetes, or atrial fibrillation, follow your doctor’s advice.

4. Avoid a high-sugar diet.High blood sugar can increase your risk for dementia, even without diabetes. So avoid highly sweetened foods like sodas and candy.

5. Keep your mind stimulated. Games and puzzles are great. But also consider volunteering and social activities that keep you independent and engaged with friends and family. For example, learn new computer skills; participate on a board, in a book club, or dance group; or try gardening, crafts, or cooking.

6. Avoid certain drugs. Talk to your doctor about your medicine—both prescription and nonprescription. For brain health, you want to avoid dangerous interactions or being over-medicated.

8. Prevent falls. Falls can cause a head injury, broken bones, or other harm that triggers gradual or sudden loss of function. To avoid falling, practice balance and strength exercises. Beware that drinking and drugs can affect balance. And be careful: watch for uneven walking surfaces and cords that can trip you. Wear shoes or slippers with good soles. Avoid going barefoot or walking in stocking feet. If you bike or ski, wear a helmet.

9. Minimize stress.Hormones secreted when you’re under stress have a stronger effect on older brains, challenging your ability to recover from emotional upset. So take change slowly and learn ways to cope with anxiety or tension.

10. Sleep well. Inadequate sleep is linked to slower thinking and risk of dementia. Seven to nine hours a night is best. But be wary of sleep medications that can make cognitive problems worse. Instead, talk to your doctor about “sleep hygiene”—that is, habits to help your body settle down at bedtime.

Dr. Eric B. Larson is executive director of Group Health Research Institute, where he leads research on healthy aging, including the Adult Changes in Thought (ACT) study.