We provide a novel, unifying physical interpretation on the origin, the average shape, the scatter, and the cosmic evolution for the main sequences of starforming galaxies and active galactic nuclei at high redshift z $gtrsim$ 1. We achieve this goal in a model-independent way by exploiting: (i) the redshift-dependent SFR functions based on the latest UV/far-IR data from HST/Herschel, and re- lated statistics of strong gravitationally lensed sources; (ii) deterministic evolutionary tracks for the history of star formation and black hole accretion, gauged on a wealth of multiwavelength observations including the observed Eddington ratio distribution. We further validate these ingredients by showing their consistency with the observed galaxy stellar mass functions and AGN bolometric luminosity functions at different redshifts via the continuity equation approach. Our analysis of the main sequence for high-redshift galaxies and AGNs highlights that the present data are consistently interpreted in terms of an in situ coevolution scenario for star formation and black hole accretion, envisaging these as local, time coordinated processes.