I agree with dragonfly, sounds like anxiety.
I tried to fall asleep and suddenly my chest felt heavy and my heart was beating faster, I feel a little better now but what could that have been?
The term people seem to be describing is palpitations. A vague description of it is a sudden awareness of one's heartbeat. Maybe it just so happened to occur the minute you were falling asleep? Random brain activity causing a weird body spasm? Most likely not to worry about.
Panic attack or maybe sleep paralysis. Could also be a lung issue, allergies, asthma, pleurisy or the flu, and you panicked because you felt pressure. If it happens again see a doctor. Hope you continue to feel better.
Anxiety.