Arrhythmia is a condition involving a rapid or slow heart rhythm that temporarily complicates the postoperative recovery from open heart surgery. Arrhythmias can be caused by sinus node dysfunction—slow heart rate or abnormalities in atrial conduction and automaticity that predispose to rapid heart rates. Current temporary treatments for rapid atrial arrhythmias are medications or external electrical cardioversion shocks. The present invention describes a method of treatment of postoperative arrhythmias and a device that includes a multipolar plaque electrode implanted on the atrioventricular (AV) node fat pad during the initial open heart surgery, leads that exit the body, an external controller connected to the leads that delivers an electrical stimulus, and a system to monitor the heart in order to optimize cardiac performance through the selection of individual stimulation poles and the stimulus parameters. The direct electrical stimulus to the AV node lowers the heart rate to achieve a “normal” heart rate or rhythm without medications or powerful shocks. The treatment is painless and without obvious side effects. The leads are designed to be removable or degradable once the patient is no longer at risk.