You could be having too much potassium or a lack of it. Potassium is an electrolyte which helps to regulate heartbeat. The body does not store it but uses it constantly, so if you are lacking in potassium it could affect your heart rhythm. Ask your doctor to send you for a blood test
to measure your potassium levels. If it is low, you can eat more foods rich in potassium, but also a good mineral supplement will give the body the balance it needs.