Deficiencies in certain vitamins, such as magnesium or B vitamins, have been associated with heart palpitations. If you suspect a vitamin deficiency may be contributing to your palpitations, consult with a healthcare professional for evaluation and appropriate supplementation.