Capillary effects such as imbibition-drying cycles impact the mechanics of granular systems over time. A multiscale poromechanics framework was applied to cement paste, that is the most common building material, experiencing broad humidity variations over the lifetime of infrastructure. First, the liquid density distribution at intermediate to high relative humidities is obtained using a lattice gas density functional method together with a realistic nano-granular model of cement hydrates. The calculated adsorption/desorption isotherms and pore size distributions are discussed and compare well to nitrogen and water experiments. The standard method for pore size distribution determination from desorption data is evaluated. Then, the integration of the Korteweg liquid stress field around each cement hydrate particle provided the capillary forces at the nanoscale. The cement mesoscale structure was relaxed under the action of the capillary forces. Local irreversible deformations of the cement nano-grains assembly were identified due to liquid-solid interactions. The spatial correlations of the nonaffine displacements extend to a few tens of nm. Finally, the Love-Weber method provided the homogenized liquid stress at the micronscale. The homogenization length coincided with the spatial correlation length nonaffine displacements. Our results on the solid response to capillary stress field suggest that the micronscale texture is not affected by mild drying, while local irreversible deformations still occur. These results pave the way towards understanding capillary phenomena induced stresses in heterogeneous porous media ranging from construction materials, hydrogels to living systems.