Molecular cloud and protosolar nebula chemistry involves a strong interaction between the gas phase and the surface of icy grains. The exchanges between the gas phase and the solid phase depend not only on the adsorption and desorption rates but also on the geometry of the surface of the grains. Indeed, for sufficient levels of surface roughness, atoms and molecules have a significant probability to collide with the grain icy mantle several times before being potentially captured. In consequence, their net sticking probability may differ from their sticking probability for a single collision with the grain surface. We estimate the effectiveness of the recapture on uneven surfaces for the various desorption processes at play in astrophysical environments. We show that surface roughness has a significant effect on the desorption rates. We focus in particular on the production of O 2 since unexpectedly large amounts of it, probably incorporated in the comet when it formed, have been detected in the coma of comet 67P by the Rosetta probe. Our results suggest that the higher escape probability of hydrogen compared to heavier species on rough surfaces can contribute to enhancing the production of O 2 in the icy mantles of grains while keeping its abundance low in the gas phase and may significantly decrease the desorption probability of molecules involved in the O 2 chemical network.