Hospitalization exacerbates sarcopenia and physical dysfunction in older adults. Whether tailored inpatient exercise prevents acute sarcopenia is unknown. This study aimed to examine the effect of a multicomponent exercise programme on muscle and physical function in hospitalized older adults. We hypothesized that participation in a brief tailored exercise regimen (i.e., 3-5 days) would attenuate muscle function and structure changes compared with usual hospital care alone. This randomized clinical trial with blinded outcome assessment was conducted from May 2018 to April 2021 at Hospital Universitario de Navarra, Spain. Participants were 130 patients aged 75 years and older admitted to an acute care geriatric unit. Patients were randomized to a tailored 3- to 5-day exercise programme (n = 64) or usual hospital care (control, n = 66) consisting of physical therapy if needed. The coprimary endpoints were between-group differences in changes in short physical performance battery (SPPB) score and usual gait velocity from hospital admission to discharge. Secondary endpoints included changes in rectus femoris echo intensity, cross-sectional area, thickness and subcutaneous and intramuscular fat by ultrasound. Among 130 randomized patients (mean [SD] age, 87.7 [4.6] years; 57 [44%] women), the exercise group increased their mean SPPB score by 0.98 points (95% CI, 0.28-1.69 points) and gait velocity by 0.09 m/s (95% CI, 0.03-0.15 m/s) more than controls (both p < 0.01). No between-group differences were observed in any ultrasound muscle outcomes. There were no study-related adverse events. Three to 5 days of tailored multicomponent exercise provided functional benefits but did not alter muscle or fat architecture compared with usual hospital care alone among vulnerable older patients. Brief exercise may help prevent acute sarcopenia during hospitalization. ClinicalTrials.gov identifier: NCT04600453.