What is the cause of the hyperpigmentation in people with cushing syndrome and addison's disease?

Pituitary hormone. These people have increased secretion of crh (corticotropin releasing hormone & acth (adrenocorticotropic hormone, also called corticotropin) from the pituitary gland. The cells that secrete acth also secrete melanocyt stimulating hormone (msh). Msh stimulates skin and mucus cells to secrete melanin (dark bronze pigment) which leads to the hyperpigmentation. Thats the full story!
A pituitary hormone. In addison's disease, the adrenal glands stop making cortisol. The pituitary gland (just below the brain) makes massive amounts of a hormone called acth to try to get the adrenal glands to make more cortisol, but they can't. Along with the acth, the pituitary also secretes another hormone (msh) that stimulates skin cells to make more melanin, causing it to darken.