I am not sure about the relation of thyroid problems with pituitary or adrenal glands but it is possible that a person who is diagnosed for hypothyroidism but he can have symptoms of both hypo and hyper thyroids. This condition can be due to hashimoto's thyroiditis. So I advise you to go for the tests for Hashimoto's thyroiditis antibodies and then take proper treatment.