Hi,
Palpitations can be a due to multiple reasons like overexertion, caffeine, alcohol, hyperthyroidism, cardiac ailments and panic disorders. I would suggest you to see a physician and undergo complete physical examination.
In the meantime try to relax, get adequate physical exercise during the day, maintain hydration and sleep for atleast eight hrs.
http://en.wikipedia.org/wiki/Palpitation
Do consider a sleep study along with other evaluations. Racing heart during sleep can also be a sigh of sleep apnea.
How are you? Palpitations can be cardiac or non-cardiac in origin. Non-cardiac may mean you have metabolic causes such as hyperthyroidism or hypoglycemia; drug-induced causes, structural abnormalities or even psychiatric or stress. For us to understand this, we must identify the underlying cause. Blood tests for glucose, electrolytes and thyroid function tests can be done to rule out other diseases.. An ECG may also be useful in evaluating cardiac problems.
Take care and keep us posted.