Understanding the four stages of sleep