Methylxanthines work by blocking adenosine receptors in the brain, which are normally involved in promoting sleep and suppressing arousal. By inhibiting these receptors, methylxanthines increase the activity of the respiratory centers, improving the infant's ability to maintain a regular breathing pattern. Additionally, they enhance diaphragmatic contractility, further supporting respiratory function.