We evaluated whether sample entropy of heart rate time series could serve as a biomarker for guiding caffeine cessation in preterm infants treated for apnoea of prematurity (AOP). We also assessed associations of sample entropy with weeks of gestation, clinical morbidity, AOP frequency and caffeine reinitiation. We conducted a prospective single-centre study at the University Children's Hospital Basel, Switzerland, from July 2019 to June 2020. We included 61 hospitalised preterm infants born before 32 weeks of gestation. Heart rate was derived from the clinical standard monitoring system at caffeine cessation, 3 days later, and at discharge. Sample entropy was calculated from 90-min recordings using custom-written analytical software. We obtained valid data from 44/61 infants (72%) with a mean of 28.4 weeks of gestation (range: 24.0-31.7). Twenty-eight (64%) were male. Sample entropy at caffeine cessation was positively associated with weeks of gestation (R2 = 0.15, p = 0.01) and negatively with bronchopulmonary dysplasia (R2 = 0.18, p = 0.01). It did not predict AOP frequency or caffeine reinitiation. Sample entropy at caffeine cessation is associated with maturation at birth and bronchopulmonary dysplasia but does not predict AOP within 3 days of cessation. Further studies should assess longitudinal measurements to predict respiratory control in preterm infants. clinicaltrials.gov: NCT04303494.