It's no wonder why middle managers are so often the punchline of work-related jokes. Sandwiched between bosses who sometimes overlook them and junior staff who sometimes resent them, you could argue that they have the most stressful jobs in the modern world.

Now researchers have quantified just how much this work weighs on their mental health.

In a study published in the journal Sociology of Health & Illness on Tuesday, researchers found that these middle managers were significantly more likely to suffer symptoms of depression and anxiety than their counterparts at the top or bottom of the workplace hierarchy.

Based on data on nearly 22,000 people who work full-time and participated in the National Epidemiologic Survey on Alcohol and Related Conditions, which involves in-person interviews with Americans 18 years and older, the researchers sorted people into four groups.

The first included those at the very top of the pyramid -- the "capitalists" as the researchers called them. These are the owners of businesses and earn more than $71,500 per year, which puts them in the 90th percentile nationwide for salary.

Next up were the middle managers. The researchers separated them into two groups. One was labeled "managers" and included those in an executive, administrative or managerial occupation and that had a bachelor's degree or higher. "Supervisors" were defined as having the same types of jobs as managers but with less than a bachelors degree.

The last group was comprised of worker bees from a wide range of sectors and includes salespeople, tech workers, farmers and police.

Then they estimated the prevalence of having had depression or anxiety during the previous 12 months and  odds of developing the conditions over a lifetime.

Previous studies have shown that mental issues such as anxiety and depression were related to socioeconomic factors like income and education -- but this study is among the first to explore social class and position of power in the labor market.

The results were striking.

After controlling for factors like age, gender and location, they found that the manager/supervisor categories had a much higher prevalence of both depression and anxiety as compared with those above and below them. While nearly 19 percent of supervisors and 16 percent of managers were estimated to suffer from depression some time in their life, 12 percent of regular workers and 11 percent of owners did. As for anxiety, supervisors (the middle managers who had less than a bachelor's degree) were the worst off with 11 percent suffering from anxiety as compared to 7 percent of managers, 5 percent of workers and a mere 2 percent of owners.

Middle managers occupy a strange space in the labor market.

Unlike many workers at the bottom of rung of companies, managers are often alienated from production and the products of their labor -- which Seth J. Prins, a doctoral student at Columbia University's Mailman School of Public Health, and his co-authors wrote may "diminish self-efficacy and result in a sense of powerlessness."

But they're not at the top either so they don't necessarily see the same benefits as their bosses from the fruits of the labor they are putting in either. Scientists call this exploitation. (You only need to read any public company's 10-K and look under CEO compensation to see that that's true.)

Another big issue is powerlessness. Their bosses may exclude them from access to resources and control their labor activities in a way that researchers describe as domination. "Workers with jobs low in decision latitude and high in demands show higher depressive symptoms, and those with jobs low in direction, control and planning... have higher psychological distress and major depression," the study authors wrote.

The researchers said they hoped their work would spur more population health research about effects of this type of inequality: "The findings of the present study allude to broader social problems that are the result of the political-economic arrangements of post-industrial capitalism in the developed world."

Read more: