The aperiodic X-ray variability in neutron star and black hole X-ray binaries (XRBs), and active galactic nuclei (AGN) shows a characteristic linear relationship between rms amplitude and flux, implying a multiplying-together or `coupling of variability on different time-scales. Such a coupling may result from avalanches of flares, due to magnetic reconnection in an X-ray emitting corona. Alternatively this coupling may arise directly from the coupling of perturbations in the accretion flow, which propagate to the inner emitting regions and so modulate the X-ray emission. Here, we demonstrate explicitly that the component of aperiodic variability which carries the rms-flux relation in the accreting millisecond pulsar SAX J1808.4-3658 is also coupled to the 401 Hz pulsation in this source. This result implies that the rms-flux relation in SAX J1808.4-3658 is produced in the accretion flow on to the magnetic caps of the neutron star, and not in a corona. By extension we infer that propagating perturbations in the accretion flow, and not coronal flares, are the source of the rms-flux relations and hence the aperiodic variability in other XRBs and AGN.