The triboelectric nanogenerator (TENG) is a promising technology for mechanical energy harvesting. TENG has proven to be an excellent option for power generation but typically TENGs output power drops significantly in humid environments. In this work, the effect of electrode’s material on power output, considering smooth and nanostructured porous structures with various surface hydrophobicity, is investigated under various humidity conditions. A vertical contact-separation mode TENG is experimentally and numerically studied for four surface morphologies of Ti foil, TiO2 thin film, TiO2 nanoparticulated film, and TiO2 nanotubular electrodes. The results show that the TENG electrical output in the flat structures such as Ti foil and TiO2 thin film at 50% RH is reduced to 50% of its initial state, while in the nanoporous structures such as nanoparticle and nanotube arrays, this is observed at RH above 95%. The results show that the use of porous nanostructures in TENG due to their high surface-to-volume, and that the process of water adsorption on the pore leads to better performance than the flat surface in humid environments. Based on our study, employing nanoporous layers is vital for nanogenerators either for power generation or active sensor applications at high humidity conditions.