Abstract. The response of water vapour (H2O) and noctilucent clouds (NLCs) to the solar cycle are studied using the Leibniz Institute for Middle Atmosphere (LIMA) model and the Mesospheric Ice Microphysics And tranSport (MIMAS) model. NLCs are sensitive to the solar cycle because their formation depends on background temperature and the H2O concentration. The solar cycle affects the H2O concentration in the upper mesosphere mainly in two ways: directly through the photolysis and, in time and place of NLCs formation, indirectly through temperature changes. We found that H2O concentration correlate positively with the temperature changes due to the solar cycle at altitudes above about 82 km, where NLCs form. The photolysis effect leads to an anti-correlation of H2O concentration and solar Lyman-α radiation, which gets even more pronounced at altitudes below ~83 km when NLCs are present. We studied the H2O response to Lyman-α variability for the period 1992 to 2018, including the two most recent solar cycles. The amplitude of Lyman-α variation decreased by about 40 % in the period 2005 to 2018 compared to the preceding solar cycle, resulting in a lower H2O response in the late period. We investigated the effect of increasing greenhouse gases (GHGs) on the H2O response throughout the solar cycle by performing model runs with and without increases in carbon dioxide (CO2) and methane (CH4). The increase of methane and carbon dioxide amplify the response of water vapour to the solar variability. The solar cycle response is reduced in the late solar cycle due to a smaller amplitude of Lyman-α variability in the second period. Applying the geometry of satellite observations, we find a missing response when averaging over altitudes of 80 to 85 km, where H2O has a positive and a negative response (depending on altitude) which largely cancel out. One main finding is that during NLCs the solar cycle response of H2O strongly depends on altitude. A negative correlation between H2O and Lyman-α is found in the NLC sublimation zone below an altitude of about 83 km, but a positive response is present at the altitudes above 83 km where NLCs form.