Subterranean structures such as aquifers and depleted gas reservoirs (DGRs) offer a scalable, high-pressure, secure, cost-efficient, and ecologically friendly means of hydrogen (H2) storage. Underground H2 storage (UHS) has emerged as a potential solution to alleviate the imbalance between the fluctuating renewable energy generation and the demand for a constant energy supply. Quantifying the recovery efficiency is of paramount importance in the effort toward large-scale UHS. In this numerical simulation study, we employed a high-resolution grid for the discretization of a synthetic (but realistic) heterogeneous anticline intended as a H2 storage facility, and we assessed the H2 recovery efficiency, and the purity of produced gas associated with UHS in natural reservoirs involving different pre-existing gases and their quantities. All of these studies included an initial phase of cushion gas injection, followed by 4 cycles of H2 storage operations composed of injection-idle-withdrawal periods. The simulation results indicated that the H2 round-trip recovery efficiency RH increased (a) with an increasing number of storage cycles, routinely exceeding 90% and providing evidence of a self-enhancement or self-optimization H2 recovery mechanism and (b) with an increasing amount of pre-existing gas in the storage zone prior to the H2 injections — at the end of the 4-cycle test, the highest RH is associated with a DGR with a pre-existing gas consisting of residual CH4 and additional injected N2, and the lowest RH corresponds to an aquifer with no cushion gas. Conversely, the H2 mass fraction of the produced gas FHQ (a) increased with an increasing number of storage cycles, but (b) decreased rapidly with an increasing amount of pre-existing gas. The presence of a pre-existing gas inevitably leads to severe contamination of the produced H2, which never exceeds 40% in the produced gas, can be as low as 4% in early cycles, and cannot be used as a H2 fuel without gas separation. Aquifer storage without a cushion gas may exhibit the lowest H2 recovery (about 75% in the long run), but yields practically pure H2 that does not require further processing before use. A positive conclusion is that, under the conditions of this study, total H2 losses (including H2 escaping into the caprock, and inaccessible H2 dissolved in the aqueous phase of the formation or remaining in the gas storage zone) are limited and manageable, indicating the technical feasibility of geologic H2 storage.