In addition to a host of other health problems (chronic fatigue, SIBO) I have also suffered heart palpitations. I have no idea why they started, but what has worked for me was to keep a food diary. I think some people, for whatever reason, develop a sensitivity to certain foods in the diet. For me, specifically, honey and jalapenos pose a problem. What tipped me off was a family member who also suffers from palpitations and arrhythmia (he sees a cardiologist and was formally diagnosed). So he was very interested when he read about some varieties of honey being linked to arrhythmia. So I noticed that I too frequently have palpitations when I have honey. Anyway, it's worth seeing if you can draw any links between the palpitations and what you are eating when you experience them.
I have noticed a connection between sugar intake on an empty stomach and heart palpitations.
If I reach for a sugary snack to hold me over until meal time I am getting heart palpitations.
I think a piece of cheese or handful of nuts would be better and will try that soon.