If it only happens when you are sleeping, how will you know when to fire it off? There are pacemakers that do such things, and they apply a relatively small amount of current directly to the heart.
A "cattle prod" type implement may necessarily need to operate at higher power levels to reach the heart and will stimulate surrounding nerves and muscles as well as the heart. That will be uncomfortable.
There may also be some timing issues involved.
Once a fellow showed me one of those trick "shock" pens - the one that gives the hand a mild shock when you push the button to extend the ball point. This was soon after I had had a stent placed in my heart. Not thinking about the stent, I tried the pen. I'm left handed, and I swear, I felt a jab in the heart when the pen went off.
Weston Bye - Author, The Mechatronist column, Digital Machinist magazine
~Practitioner of the Electromechanical Arts~