Magnesium is used for treating and preventing magnesium deficiency. It is also used orally as a laxative for constipation. Magnesium is used for treating symptoms of asthma and allergic rhinitis; for cardiovascular diseases including angina, arrhythmias, hypertension, coronary heart disease and hyperlipidemia, low high-density lipoprotein (HDL) levels, mitral valve prolapse, vasospastic angina, myocardial infarction, multiple sclerosis, and as an antacid for symptoms of gastric hyperacidity. It is also used orally for treating attention deficit-hyperactivity disorder (ADHD), anxiety, chronic fatigue syndrome (CFS), Lyme disease, fibromyalgia, nocturnal leg cramps, diabetes, kidney stones, migraine headaches, osteoporosis, altitude sickness, urinary incontinence, kidney stones, erythromelalgia, restless leg syndrome, and for preventing hearing loss. Magnesium is also used orally by athletes to increase energy and endurance.