During times of stress, the hypothalamus, a collection of nuclei that connects the brain and the endocrine system, signals the pituitary gland to produce a hormone, which in turn signals the adrenal glands, located above the kidneys, to increase the production of cortisol.