DEAR DOCTOR K: I recently had a heart attack. Now my doctor wants me to start cardiac rehabilitation. Is it dangerous for me to start exercising so soon?

DEAR READER: I understand your concern. Not that long ago, rest was exactly what the doctor ordered after a heart attack. Taking it easy, the thinking went, would help the heart heal more quickly.

Now, doctors know that inactivity doesn’t help your heart or the rest of your body. Exercise actually strengthens your heart, if you do it correctly. And it helps your muscles use oxygen more efficiently, easing the heart’s workload.

Cardiac rehabilitation is a medically supervised program. It’s designed to help you heal your heart and keep it healthy.

The centerpiece of cardiac rehab is usually a structured and supervised exercise program. Your initial attempts at exercise are closely monitored in a medical setting. You start off exercising slowly, for short periods, and gradually increase the pace. Monitoring can spot any heart problems that may develop while you exercise.

You should start cardiac rehab a month or so after a heart attack or bypass surgery. You can start even sooner after angioplasty.

Rehab programs also teach you how to manage your risk factors for heart disease. These include weight management, nutrition, stress reduction and quitting smoking. The staff typically includes doctors, nurses, exercise specialists, physical and occupational therapists, nutritionists and psychologists.

You should expect to go to the rehab facility for a few hours, one to three times a week. Some people attend for just a few weeks. Others continue for months. Ask your doctor if the program is certified by the American Association of Cardiovascular and Pulmonary Rehabilitation (AACVPR).

Properly supervised exercise not only is healthy for your heart after a heart attack, it also introduces many people to exercise for the first time as an adult.

I had a patient who was a world-class couch potato. He hadn’t done anything remotely resembling exercise since his high school phys-ed class. In his late 50s he had a heart attack. Not surprisingly, he wasn’t a happy camper the first few days on a stationary bicycle. But by the third week of cardiac rehab he told me, “This isn’t so bad.” By the end of the second month, he noticed he was feeling happier and more energetic than he had since high school.

That was 20 years ago, and he has exercised nearly every day since. And he hasn’t had another problem with his heart.

Still need some convincing? People who participate in cardiac rehab are less likely to die during the first few years following a heart attack or procedure. Participating in rehab can also improve your quality of life. And you may enjoy exercising with people who’ve gone through a similar experience.

We have more information on cardiac rehabilitation in our Special Health Report, “Heart Disease: A Guide to Preventing and Treating Coronary Artery Disease.” You can find out more about it at my website.

Dr. Komaroff is a physician and professor at Harvard Medical School. Go to his website to send questions and get additional information: www.AskDoctorK.com.