  We report molecular gas mass estimates obtained from a stacking analysis of
CO line emission in the ALMA Spectroscopic Survey (ASPECS) using the
spectroscopic redshifts from the optical integral field spectroscopic survey by
the Multi Unit Spectroscopic Explorer (MUSE) of the {\it Hubble} Ultra Deep
Field (HUDF). Stacking was performed on subsets of the sample of galaxies
classified by their stellar mass and position relative to the main-sequence
relation (on, above, below). Among all the CO emission lines, from \cotwoone to
CO(6-5), with redshifts accessible via the ASPECS Band~3 and the MUSE data,
\cotwoone provides the strongest constraints on the molecular gas content. We
detect \cotwoone emission in galaxies down to stellar masses of
$\log{(M_*/M_\odot)}=10.0$. Below this stellar mass, we present a new
constraint on the molecular gas content of $z\sim1.5$ main-sequence galaxies by
stacking based on the MUSE detections. We find that the molecular gas mass of
main-sequence galaxies continuously decreases with stellar mass down to
$\log{(M_*/M_\odot)}\approx9.0$. Assuming a metallicity-based CO--to--$\rm H_2$
conversion factor, the molecular gas-to-stellar mass ratio from
$\log{(M_*/M_\odot)}\sim9.0$ to $\sim10.0$ does not seem to decrease as fast as
for $\log{(M_*/M_\odot)}>10.0$, which is in line with simulations and studies
at lower redshift. The inferred molecular gas density $\rho{\rm
(H_2)}=(0.49\pm0.09)\times10^8\,{\rm M_\odot\,Mpc^{-3}}$ of MUSE-selected
galaxies at $z\sim1.5$ is comparable with the one derived in the HUDF with a
different CO selection. Using the MUSE data we recover most of the CO emission
in our deep ALMA observations through stacking, demonstrating the synergy
between volumetric surveys obtained at different wavebands.
