Which body system is primarily responsible for maintaining homeostasis through the release of hormones?