A trial involving nearly 3,000 workers has found working shorter hours makes staff happier and healthier.