If you’ve been in the hospital for a heart-related issue (such as a heart attack or chest pain), your doctor will usually recommend waiting about one to three weeks after you get out of the hospital before you begin cardiac rehab.