There's some good news for desk jockeys: your work lives appear to have a serious upside. After years of research documenting the risks of sitting at a desk all day, a new study finds a perk — those who do office work are sharper mentally later in life.

Workers in jobs that require more physical effort and activity — like construction, restaurant or factory workers — have long been thought to be in better mental and physical shape later in life than office workers whose sedentary work puts them at risk for heart, sleep and mood problems.

“Because desk jobs tend to be more mentally challenging than manual occupations, they may offer protection against cognitive decline.”

A new University of Cambridge study pokes a few holes in this idea, finding that office work offers protection against cognitive decline and that many who spend their days sitting at a desk actually may end up exercising more than those with more physically demanding jobs.

“The often used mantra ‘what is good for the heart, is good for the brain’ makes complete sense, but the evidence on what we need to do as individuals can be confusing,” one of the authors of the study, Shabina Hayat, said. “With our large cohort of volunteers, we were able to explore the relationship between different types of physical activity in a variety of settings.”

People in the study filled out a health and lifestyle questionnaire that included information on their level of physical activity at work and in their leisure time and were given a health examination. They were invited back after about 12 years on average and completed a battery of tests that measured aspects of cognitive performance like memory, attention and visual processing speed. A test of their reading ability helped determine their IQ.

Those with little education were more likely to have physically active jobs, they found, but they were less likely to be physically active outside of work. Not only did those who had sedentary desk jobs have a far lower risk of poor cognition, those who had continued in their work during the study's duration were most likely to be in the top 10 percent cognitively, regardless of their education, while people who did manual work had three times the risk of poor cognition compared to those with desk jobs.

“…[T]he relationship between physical activity and cognitive is not straightforward,” explained Hayat, a member of the Department of Public Health and Primary Care at the University of Cambridge. “While regular physical activity has considerable benefits for protection against many chronic diseases, other factors may influence its effect on future poor cognition. People who have less active jobs — typically office-based, desk jobs — performed better at cognitive tests regardless of their education. This suggests that because desk jobs tend to be more mentally challenging than manual occupations, they may offer protection against cognitive decline.”

The study is published in the International Journal of Epidemiology.