Medicine: Some medications increase the risk of osteoporosis, such as taking steroids or antacids for a long time.