After age 40, the average person loses about 1/2" of their height per decade. It happens because of gravity and wear and tear on bones, muscles and joints. Think of your skeleton as being made up of your ankles, legs, hips, spine, neck, skull and connective tissue between the joints. Over time, these bones and joints degenerate, and height is lost. A person's lifestyle can affect their muscle mass, bone health and posture.
Bone loss occurs after menopause for women, and at the same age for men. Decreasing estrogen and testosterone are important factors in bone loss known as osteopenia. Vitamin D, calcium and regular exercise are important for preserving muscle and bone mass. Too much bone loss is called osteoporosis, and bone building medication can halt this process in both men and women.