Workers were supposed to be taking time out, but instead ended up feeling stressed out.

Researchers at the University of Sussex in England found that companies trying to help workers disconnect did more harm than good.

Employees banned from checking work emails after hours ended up feeling more stressed than relieved. Not surprisingly, those most affected were already prone to neuroticism and anxiety.

“People need to deal with email in the way that suits their personality and their goal priorities in order to feel like they are adequately managing their work load,” said Emma Russell, lead author of the study.

Despite the findings, one Big Apple lawmaker wants to make it illegal for companies to enforce a 24/7 work culture — by banning them from bombarding employees when they are not at work.

Brooklyn Councilman Rafael L. Espinal Jr. last year introduced a “right to disconnect” bill, which would make it illegal for New York employers to force workers to check and respond to emails, texts or Slack messages during “non-work hours.”

“I thought it was a great idea to start a conversation in New York,” Espinal told The Post, expressing his admiration for similar legislation in Europe.

“Being a very ambitious and busy city, we could lead the country in this conversation to show if we’re able to do it here in New York, then we can do it anywhere.”

Espinal has been met with fierce opposition from business groups. He said his bill was intended to protect workers from retaliation if they didn’t return calls or emails after work.

“I don’t believe it would create an environment in which the city becomes less productive,” he said.

“It means people will be able to take time off when they feel they need it and be able to recharge and focus on their own wellness and be able to produce at a higher output.”

The bill is still being debated in the council.