We have studied the respiratory compensation for elastic loads in 15 term and preterm infants. Elastic loads, approximately equal to the infant's effective elastance, were applied to the airway for five breaths while tidal volume and mask pressure were monitored. Motion of the rib cage and abdomen were monitored simultaneously with magnetometers. The studies were done both in active or REM sleep and in quiet or non-REM sleep. During quiet sleep the load immediately reduced the tidal volume by about 50% but a progressive increase in tidal volume occurred over the next four loaded breaths. During active sleep load compensation was disorganized with respect to both tidal volume and frequency, and compensation was significantly less. Active sleep was also characterized by marked rib cage distortion. We suggest that during active sleep there is tonic inhibition of the intercostal muscles, allowing the diaphragm to distort the rib cage. This distortion impairs load compensation by a direct mechanical effect and indirectly by initiating an intercostal-phrenic reflex.