why is waking up a part of sleep?