Water flowing through hyporheic river sediments or artificial recharge facilities promotes the development of microbial communities with sediment depth. We performed an 83-day mesocosm infiltration experiment, to study how microbial functions (e.g., extracellular enzyme activities and carbon substrate utilization) are affected by sediment depth (up to 50 cm) and different oxygen concentrations. Results indicated that surface sediment layers were mainly colonized by microorganisms capable of using a wide range of substrates (although they preferred to degrade carbon polymeric compounds, as indicated by the higher β-glucosidase activity). In contrast, at a depth of 50 cm, the microbial community became specialized in using fewer carbon substrates, showing decreased functional richness and diversity. At this depth, microorganisms picked nitrogenous compounds, including amino acids and carboxyl acids. After the 83-day experiment, the sediment at the bottom of the tank became anoxic, inhibiting phosphatase activity. Coexistence of aerobic and anaerobic communities, promoted by greater physicochemical heterogeneity, was also observed in deeper sediments. The presence of specific metabolic fingerprints under oxic and anoxic conditions indicated that the microbial community was adapted to use organic matter under different oxygen conditions. Overall the heterogeneity of oxygen concentrations with depth and in time would influence organic matter metabolism in the sediment tank.