Calculates bedtimes and wake-up times to allow full REM cycles.