AI helps patients to get more rest while reducing staff workload