It depends on the type of exercise, for example, you can start walking while you are still in the hospital and after that as you heal you can increase your physical activities day by day. Your doctor will guide you to increase your activity depending on your progress.