The microstructure and chemical composition of the discharge products generated in sodium-oxygen batteries are analyzed by transmission X-ray microscopy (TXM) revealing a complex architecture. Unexpectedly, sodium peroxide is detected in the cubic-shaped discharge deposits associated with the often reported sodium superoxide. Analyses on the product distribution show a surface layer rich in decomposition products in contact with an O-deficient region enclosing the bulk of these cubes. In addition, we show that oxygen evolution reaction (OER) occurs by a process that involves oxidation and re-dissolution of the bulk fraction, leading to a contraction of the discharge particles and a composition similar to that found in the intermediate phase of the deposits observed at the end of discharge. All these solid compounds are eventually removed at the end of recharge, but formation of these structures evidence possible irreversible pathways that need to be considered for the cycle life improvement.