Calcium and magnesium work together to control muscle contraction. Muscle proteins require calcium to initiate contraction, and magnesium to initiate relaxation of muscle fibers. Magnesium also increases the absorption of calcium from blood, and it is required for protein synthesis and energy production.