Palpitations are often a trigger for people who suffer from anxiety.
You can read an article from Dr. Carolyn Dean about magnesium for anxiety and heart palpitations here - https://drcarolyndean.com/2010/04/magnesium-cures-anxiety-and-heart-palpitations/