Magnesium is essential for over 300 processes in your body, including muscle function, bone strength, energy production and nervous system support. However, stress, a busy lifestyle, poor diet, and high sugar or alcohol intake can quickly deplete your magnesium levels.