We determine the masses, the singlet and octet decay constants as well as the anomalous matrix elements of the eta and eta ' mesons in N-f = 2 + 1 QCD. The results are obtained using twenty-one CLS ensembles of non-perturbatively improved Wilson fermions that span four lattice spacings ranging from a approximate to 0.086 fm down to a approximate to 0.050 fm. The pion masses vary from M-pi = 420 MeV to 126 MeV and the spatial lattice extents L-s are such that LsM pi greater than or similar to 4, avoiding significant finite volume effects. The quark mass dependence of the data is tightly constrained by employing two trajectories in the quark mass plane, enabling a thorough investigation of U(3) large-N-c chiral perturbation theory (ChPT). The continuum limit extrapolated data turn out to be reasonably well described by the next-to-leading order ChPT parametrization and the respective low energy constants are determined. The data are shown to be consistent with the singlet axial Ward identity and, for the first time, also the matrix elements with the topological charge density are computed. We also derive the corresponding next-to-leading order large-N-c ChPT formulae. We find F-8 = 115.0(2.8) MeV, theta(8) = -25.8(2.3)degrees, theta(0) = -8.1(1.8)degrees and, in the (MS) over bar scheme for N-f = 3, F-0(mu = 2 GeV) = 100.1(3.0) MeV, where the decay constants read F-eta(8) = F-8 cos theta(8), F-eta '(8) = F-8 sin theta(8), F-eta(0) = -F-0 sin theta(0) and F-eta '(0) = F-0 cos theta(0). For the gluonic matrix elements, we obtain a(eta)(mu = 2 GeV) = 0.0170(10) GeV3 and a(eta ')(mu = 2 GeV) = 0.0381(84) GeV3, where statistical and all systematic errors are added in quadrature.