Trapping of sub-eV hydrogen and deuterium atoms in carbon