One way to decrease awareness of palpitations in bed is simply mechanical: Many people feel ectopics more when they lie on their left side, where compression of the chest causes the apex of the heart to be thumping nearer the ribs, so lying on the other side can sometimes help. Second, you can use pillows or a bed wedge to raise your torso a bit. You will feel and hear the odd beats less if your chest is not on the mattress.
Third, beta blockers slow the heartbeat and some patients find that this creates more of an opportunity for the rogue heart cells to initiate an ectopic in the pause between normal beats.
Fourth, you are dealing with anxiety over your exams, and anxiety increases palps. I'd vote for an SSRI in this case. However, these meds vary greatly in their effects, and I personally have found Lexpro (escitalopram) to be more stimulating than others in this group. For me, Zoloft and Celexa are more calming.
probably silly, but have you tried reading a book to take you mind off things? I can quite easily fall asleep reading, or even watching a movie.