The process of controlling automatic activities of the internal body organs whether we are asleep or awake is called autonomic nervous system.
The autonomic nervous system is a control system that acts largely unconsciously and regulates bodily functions, such as the heart rate, digestion, respiratory rate, pupillary response, urination, and sexual arousal. This system is the primary mechanism in control of the fight-or-flight response.