I actually went online specifically for the reason of looking at this subject, and I don't usually post on random sites, but I hope this helps.
I have been going through the same thing, racing heart, then mild sweating about 4hours after sleep occurs. The worst is that if I try to ignore it and go back to sleep. I start having all of these anxious thoughts..like every negative thing that is or could happen in my life all hitting me at once in my mind. It is like my body is saying," oh the heartbeat and sweats don't work. Take this! Get out of bed." So I do, then eventually go back to sleep. It sounds funny, but when you share a bed with someone, it is really disruptive. I do drink wine before going to sleep. The ironic part is I began drinking wine years ago after going through a horrible bout of anxiety and panic attacks which kept me from sleeping. So, I started drinking wine before bed and it put me to sleep and I never woke up. Seems like a circle.