Underground porous formations provide significant storage capacity for H-2 and CO2, making them a promising solution to aid energy needs and mitigate CO2 emissions. The interfacial tension (IFT) of H-2-brine within the underground porous formations, along with the H-2-H2O-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 CH4 and CO2 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 (CH4 and CO2) reduce the IFT when mixed with hydrogen, with CO2 having a more pronounced effect than CH4 across all salinities. Such an impact is due to the strong water-CO2 interactions compared to water-CH4 and water-H-2 interactions. Both cushion gases (CO2 and CH4) 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 CO2 and CH4 could be potential cushion gases for calcite formations, while for silica (at acidic pH), using CO2 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.