We analyse measurements of the evolving stellar mass (ℳ0 ) at which the bending of the star-forming main sequence (MS) occurs over 0 < z < 4. We find ℳ0 ≈ 1010 M⊙ over 0 < z < 1 before ℳ0 rises up to ∼1011 M⊙ at z = 2 and then stays flat or slowly increases towards higher redshifts. When converting ℳ0 values into hosting dark matter halo masses, we show that this behaviour is remarkably consistent with the evolving cold- to hot-accretion transition mass, as predicted by theory and defined by the redshift-independent Mshock at z < 1.4 and by the rising Mstream at z ≳ 1.4 (for which we propose a revision in agreement with the latest simulations). We therefore argue that the MS bending is primarily due to a drop in cold accretion, causing a reduction in available cold gas in galaxies, which supports predictions of gas feeding theory. In particular, the rapidly rising ℳ0 with redshift at z > 1 is evidence in favour of the cold-streams scenario. In this picture, a progressive fuelling reduction rather than its sudden suppression in halos more massive than Mshock/Mstream produces a nearly constant star-formation rate in galaxies with stellar masses larger than ℳ0, and not their quenching, which therefore requires other physical processes. Compared to the knee M* in the stellar mass function of galaxies, ℳ0 is significantly lower at z < 1.5, and higher at z > 2, suggesting that the imprint of gas deprivation on the distribution of galaxy masses happened at early times (z > 1.5–2). The typical mass at which galaxies inside the MS become bulge-dominated evolves differently from ℳ0, which is consistent with the idea that bulge formation is a distinct process from the phasing out of cold accretion.