Monitoring the mobility of patients in bed