Underground porous formations provide significant storage capacity for H 2 and CO 2 , making them a promising solution to aid energy needs and mitigate CO 2 emissions. The interfacial tension (IFT) of H 2 −brine within the underground porous formations, along with the H 2 −H 2 O−rock wettability, is a crucial factor in determining the capacity and efficiency of the underground hydrogen storage (UHS). Cushion gas is normally preinjected to maintain reservoir pressure, prevent H 2 migration into the rock matrix, and control both injectivity and productivity. Hereby, we examined the influence of CH 4 and CO 2 as cushion gases at different temperatures, pressures, and salinity conditions on the IFT of H 2 −brine and water−H 2 −rock wettability. We employed molecular dynamics (MD) simulations and confronted our IFT results against the experimentally reported data in the literature. In addition, we have assessed different water−H 2 −rock interfaces confined in a slit nanopore relevant for H 2 storage in calcite and silica formations. Our results reveal that the IFT of the brine−H 2 interface is not significantly sensitive to pressure. However, increasing the temperature reduced the IFT of H 2 −brine, in contrast to salinity that increases IFT. The cushion gases (CH 4 and CO 2 ) reduce the IFT when mixed with hydrogen, with CO 2 having a more pronounced effect than CH 4 across all salinities. Such an impact is due to the strong water−CO 2 interactions compared to water−CH 4 and water−H 2 interactions. Both cushion gases (CO 2 and CH 4 ) could not perturb the rock surface hydrations maintaining a zero-contact angle except at low pH in sandstone formations. Calcite formations maintain their strong water-wet state in all conditions of temperature, pressure, and salinity. In sandstone, we predicted an intermediate water-wet state in very good agreement with the reported experimental data. The capillary pressure maps are built to visualize the impact of IFT and rock wettability on the gas flow, storage mechanism, and caprock sealing efficiency. Our results pointed out that CO 2 and CH 4 could be potential cushion gases for calcite formations, while for silica (at acidic pH), using CO 2 might lead to gas loss into the rock matrix. Furthermore, experimental investigation is required to confirm the impact of such conditions on the storage capacity in these formations.