This happens to me a lot. Atleast once a week. My heart will suddenly start beating fast (as he said, normally when i'm at rest), but I don't feel any pain or discomfort. I just notice because I can feel my heart beating really fast, and it just surprises me. This only lasts for a few seconds. And it never wakes me from my sleep or anything. It hasn't bothered me, but I was just curious if it could be serious or not.
So I guess i'll limit my caffiene intake and get some magnesium suppliments tomorrow, to see if that helps.