Background Little is known about changes in physical activity (PA) and sedentary behavior (SB) patterns in the acute phase of a myocardial infarction (MI). We objectively assessed PA and SB during hospitalization and the first week after discharge. Methods and Results Consecutively admitted patients hospitalized with an MI were approached to participate in this prospective cohort study. SB, light-intensity PA, and moderate-vigorous intensity PA were objectively assessed for 24 h/d during hospitalization and up to 7 days after discharge in 165 patients. Changes in PA and SB from the hospital to home phase were evaluated using mixed-model analyses, and outcomes were stratified for predefined subgroups based on patient characteristics. Patients (78% men) were aged 65±10 years and diagnosed with ST-segment-elevation MI (50%) or non-ST-segment-elevation MI (50%). Sedentary time was high during hospitalization (12.6 [95% CI, 11.8-13.7] h/d) but substantially decreased following transition to the home environment (-1.8 [95% CI, -2.4 to -1.3] h/d). Furthermore, the number of prolonged sedentary bouts (≥60 minutes) decreased between hospital and home (-1.6 [95% CI, -2.0 to -1.2] bouts/day). Light-intensity PA (1.1 [95% CI, 0.8-1.6] h/d) and moderate-vigorous intensity PA (0.2 [95% CI, 0.1-0.3] h/d) were low during hospitalization but significantly increased following transition to the home environment (light-intensity PA: 1.8 [95% CI, 1.4-2.3] h/d; moderate-vigorous intensity PA: 0.4 [95% CI, 0.3-0.5] h/d; both P<0.001). Improvements in PA and SB were similar across groups, except for patients who underwent coronary artery bypass grafting and who did not improve their PA patterns after discharge. Conclusions Patients with MI demonstrate high levels of SB and low PA volumes during hospitalization, which immediately improved following discharge at the patient's home environment. Registration URL: trialsearch.who.int/; Unique identifier: NTR7646.