When I had it, it was due to low minerals, esp potassium and magnesium. Had an acquaintance with same problem and same solution. I think a factor, or maybe a result, was high blood pressure.
Also, this will happen with trigger foods (foods you are intolerant to). Keep a journal and count your pulse resting and after eating. Google pulse test and you should get information.