Different phases of sleep affect how your brain processes information.