About half of the body's magnesium is found in bone. The other half is found inside cells of body tissues and organs. Magnesium is needed for nearly all chemical processes in the body. It helps maintain normal muscle and nerve function, and keeps the bones strong. Magnesium is also needed for the heart to function normally and to help regulate blood pressure. Magnesium also helps the body control blood sugar level and helps support the body's defense (immune) system.