When you're in the more deeper stages of sleep - REM sleep, your body is quiet, but your mind is actually very active. So it's a time when your body and your brain is restoring itself. It's repairing any cell damage that happened during the day, it's really repairing, like I said, repairing your body, but also helps with digestion, helps with memory.