The adrenal glands are located on both sides of the body in the retroperitoneum, above and slightly medial to the kidneys.