Heart palpitations can be caused by a variety of factors, including anxiety, stress, physical activity, heart disease, and medications. What you are putting in your body might be causing palpitations. If heart palpitations are a symptom of an underlying heart condition, treatment will focus on the underlying cause. If heart palpitations are caused by anxiety or stress, relaxation techniques may help. Your diet can cause heart palpitations things like caffeine, chocolate, alcohol, low potassium, or low magnesium can be hidden causes of palpitations.