One other interesting piece of medical info re causes of rapid heartbeats are rom two different food additives. One is aspartame, used in many sugar substitutes and diet products..and the other is MSG, used in many foods as a flavor enchancer.
For those who are sensitive to these two items, eating foods made with these ingredients (also known as "excitotoxins") can cause a sudden spike in heat rate, a feeling of panic, sweating and a rise n blood pressure.
It's MSG that causes what's called Chinese food syndrome where some people get a headache after eating Chinese foods that often contain high amounts of MSG.
Here's a link to more info, but if you Google "excitiotoxins" or MSG or aspartame, you'll find lots more info. Several books have been written on the topic by Dr. Blaylock.
Life Time Fitness - The Healthy Way of Life Company
If you keep a food diary or trace back what you ate prior to a rapid heartbeat episode you might find it's a food additive to which you're sensitive.