Flexibility on the job can go a long way to helping employees manage their mental well-being, according to a survey by FlexJobs.

The survey, which polled 3,900 global employees, found 84 per cent of respondents said having a flexible job would help them better manage mental illnesses like anxiety and depression. More than a third (35 per cent) said they’ve had to take a break from work because of a difficult personal situation, like a death, divorce or a loved one experiencing serious physical or mental illness. Among respondents who had to take a break from work, 88 per cent said they would have remained in the workplace if their employers offered flexibility.

Read: Third of employees have left job for flexible working options

“As our survey findings confirm, flexible work can play a very positive role in supporting employees who have mental-health issues or who are going through difficult life circumstances,” said Sara Sutton, founder and chief executive officer of FlexJobs, in a press release. “Allowing employees to work flexibly reduces the conflict that we all experience between our personal and professional lives, and equips everyone to better meet their mental, emotional and physical needs.”

In terms of the reasons people want flexible jobs, work-life balance topped the list, at 67 per cent. Just over half (54 per cent) of those with flexible jobs said their work-life balance was either great or very good, while just 29 per cent without flexible jobs said the same.

Meanwhile, relatively few (21 per cent) respondents with flexible jobs said they’re stressed by their current level of work-life balance, while 43 per cent of those without flexibility said they are stressed.

Read: Editorial: Employers, flex your flexible working muscles

The vast majority (95 per cent) of survey respondents said flexible work would boost their overall happiness. Another majority said flexible work would help them take better care of themselves (89 per cent) or would reduce their stress (88 per cent), while 67 per cent said it would increase how much they exercise.

More work flexibility also affects employees’ personal relationships. Most (88 per cent) respondents said having a flexible job would help them spend more time with family and 78 per cent said it would help them be more available as a friend.

The majority (94 per cent) of respondents who have or plan to have children said a flexible job would help them be a better parent, while 85 per cent of those with pets said it would help them be a better pet owner.

Nearly two-thirds (64 per cent) said flexible work would benefit their romantic relationships, while the same number said it would improve their sex life. Some 80 per cent said it would allow them to be more attentive to a romantic partner and about half (53 per cent) said it would make room for more dates.

Read: My Take: Making it work, four days a week