Analgesia and sedation are integral to the care of critically ill children. However, the choice and dose of the analgesic or sedative drug is often empiric, and models predicting favorable responses are lacking. We aimed to compute models to predict a patient's response to intravenous morphine. We retrospectively analyzed data from consecutive patients admitted to the Cardiac Intensive Care Unit (January 2011-January 2020) who received at least one intravenous bolus of morphine. The primary outcome was a decrease in the State Behavioral Scale (SBS) ≥1 point; the secondary outcome was a decrease in the heart rate Z-score (zHR) at 30 min. Effective doses were modeled using logistic regression, Lasso regression, and random forest modeling. A total of 117,495 administrations of intravenous morphine among 8140 patients (median age 0.6 years [interquartile range [IQR] 0.19, 3.3]) were included. The median morphine dose was 0.051 mg/kg (IQR 0.048, 0.099) and the median 30-day cumulative dose was 2.2 mg/kg (IQR 0.4, 15.3). SBS decreased following 30% of doses, did not change following 45%, and increased following 25%. The zHR significantly decreased after morphine administration (median delta-zHR -0.34 [IQR-1.03, 0.00], p < 0.001). The following factors were associated with favorable response to morphine: A concomitant infusion of propofol, higher prior 30-day cumulative dose, being invasively ventilated and/or on vasopressors. Higher morphine dose, higher zHR pre-morphine, an additional analgosedation bolus ±30 min around the index bolus, a concomitant ketamine or dexmedetomidine infusion, and showing signs of withdrawal syndrome were associated with unfavorable response. Logistic regression (area under the receiver operating characteristic [ROC] curve [AUC] 0.900) and machine learning models (AUC 0.906) performed comparably, with a sensitivity of 95%, specificity of 71%, and negative predictive value of 97%. Statistical models identify 95% of effective intravenous morphine doses in pediatric critically ill cardiac patients, while incorrectly suggesting an effective dose in 29% of cases. This work represents an important step toward computer-aided, personalized clinical decision support tool for sedation and analgesia in ICU patients.