The hypothalamic−pituitary−adrenal system helps maintain balance in the body by directing the sympathetic nervous system, as well as the endocrine system, immune system and digestive system. The hypothalamic−pituitary−adrenal system mainly controls the cortisol levels and the sympathetic nervous system, but it also plays a role in regulating hormones in the endocrine system, and it moderates the immune system and the digestive system.