The procedure to implant a pacemaker does not require open heart surgery, and most people go home within 24 hours. Before the surgery, medication may be given to make you sleepy and comfortable. Generally, the procedure is performed under local anesthesia.