Photocatalytic oxygen reduction is a promising strategy to generate H2O2 in a low-energy input and more sustainable way. Despite great progress have made in photocatalyst design, the rate-limiting step that poor accessibility of the O2 to photocatalysts in water remains unexplored. Here, we design a solid-liquid-air triphasic interface over a melamine foam to boost the interfacial O2 transportation. A Wenzel-Cassie state coexists in a hydrophobic interface and form a tubular confined space with a thickness of 100 µm, which allows the O2 directly transferred to the photocatalyst from the air, greatly boost the formation of H2O2. In addition, a tubular confined microenvironment formed on the surface greatly enhances oxygen diffusion, and suppressed the unwanted decomposition of H2O2. This surface microenvironment engineering resulted in a 10-fold enhancement in the photosynthesis H2O2 compared to the traditional solid-liquid diphase system, pinpointing the necessary O2 mass diffusion for photocatalytic H2O2 generation.