An increasing number of employees are taking their bosses to court after refusing flexible working requests, according to new research.