Accumulation of hydrogen in Czochralski silicon implanted with N2+ (Si:N; N dose, DN=1–1.8x1018 cm-2; energy E=140 keV) or O2+ (Si:O; DO=1x1017 cm-2; E=200 keV), processed at up to 1400 K (HT) under enhanced Ar pressure, up to 1.2 GPa (HP), and followed by treatment in hydrogen (deuterium) plasma, was investigated by Secondary Ion Mass Spectroscopy. Implantation produces buried amorphous layer. As determined by transmission electron microscopy, subsequent HT-HP processing results in a formation of a specific sample microstructure. In plasma treated as-implanted Si:N, hydrogen accumulates at a depth of about 50 nm, up to concentration 2x1021 cm-3. This concentration is twice lower at a depth ≈ 80–250 nm. Deuterium content remains almost unchanged after plasma treatment of Si:N prepared by processing at 1270 K while it is strongly dependent on DN and on HP. In plasma treated Si:O, prepared by processing at 920-1230 K, hydrogen profile corresponds to that of implanted oxygen and decreases with HP. Comparative analysis of hydrogen accumulation and its subsequent release at 720-920 K in the Si:N and Si:O structures indicates that the capacity of buried layers in Si:O to getter and to preserve hydrogen is higher than that in Si:N.