We are definitely very active even when we are sleeping !! In fact sleep is a very dynamic activity. Our brains are active during sleeping. Nerve-signaling chemicals called neurotransmitters, for example, acetyl choline , control whether we are asleep or awake by acting on different groups of nerve cells, or neurons, in the brain. During every sleep at night, we go through two stages. Slow wave sleep and rapid eye movement sleep.
Slow wave sleep is generally more pleasant. But during the REM sleep we actually get dreams and nightmares and depending on what we actually undergo the other systems in our body will respond. Activities in the brain like decision making, emotional responses, social interactions are drastically reduced during sleep. A lot of ' invisible' activities happen during sleep. Hence when we sleep we are definitely active and hence were safe !!