Yes, both hypothyroidism and hyperthyroidism can cause weight gain due to a slower metabolism.