(TNS) Attention 20-somethings: If you want to preserve your brainpower for middle age and beyond, you should turn off the TV and head to the gym right now.

Skeptical? Consider the fates of 3,247 people who took a variety of cognitive function tests in their 40s and 50s after being tracked by researchers for 25 years.

The people who were most likely to get the lowest scores were the ones who watched the most television and the ones who got the least exercise when they were young adults. The extreme couch potatoes — that is, those who were lazy on both counts — had the greatest risk of intellectual decline, according to a new study in JAMA Psychiatry.

The results suggest it's never too early for adults to start thinking about ways to stave off Alzheimer's disease and other forms of dementia that are usually associated with old age, the study authors wrote.

Experts have already linked sedentary behavior in middle age with cognitive impairment, and the researchers wanted to see whether the relationship might start even earlier.

So the team, led by Tina Hoang of the Veterans Affairs Medical Center in San Francisco, examined data from a study known as CARDIA, or Coronary Artery Risk Development in Young Adults. People between the ages of 18 and 30 joined the study in the mid-1980s, and researchers checked in with them every two to five years to gauge their health and learn about their lifestyle choices, including exercise and TV viewing. When the study wrapped up in 2011, the participants took three tests to measure their cognitive processing speed, executive function and verbal memory.

Among the 3,247 participants, 11 percent were judged to have "a long-term pattern of high television viewing," which was defined as watching more than three hours a day at least two-thirds of the time. These TV addicts were 64 percent more likely than the others to have poor cognitive performance based on the results of a test that measured processing speed and executive function. They were also 56 percent more likely to perform poorly on another test of executive function only. This was true even after the researchers accounted for factors such as age, gender, educational level and body mass index.

In addition, 16 percent of the participants qualified as having "a long-term pattern of low physical activity." That meant the amount of time they spent jogging, biking, swimming, hiking, playing tennis, doing yard work or getting other types of exercise was usually so low that it would have ranked in the bottom 25 percent at the start of the study.

Compared with people who had moderate to high levels of physical activity, the ones in the low-activity group were 47 percent more likely to score in the "poor" range on the test of processing speed and executive function, even after adjusting for things like age and BMI.

When the researchers focused on the 1.6 percent of people with "very low" physical activity over time, the results were more striking — they were more than twice as likely to have poor cognitive performance on all three of the tests.

Finally, the researchers looked at the 3 percent of people who consistently watched the most TV and got little exercise. Compared with the people who consistently got moderate to high amounts of exercise and consistently watched less than three hours of TV a day, the extreme couch potatoes were about twice as likely to score poorly on the two tests that measured processing speed and executive function. They also did worse on the test of verbal memory, but not by enough to be considered statistically significant.

———

©2015 Los Angeles Times

Visit the Los Angeles Times at www.latimes.com