We have performed Ti K-edge EXAFS and XANES measurements on 4 and 3 wt% TiCl3-activated NaAlH4 and (LiBH4+0.5MgH 2) and Ni K-edge measurements on 3 and 11 wt% NiCl 2-activated (LiBH4+0.5MgH2) and (Li 3BN2H8) - prospective hydrogen storage materials. The valence of Ti and Ni is close to zero and invariant during hydrogen cycling. None of the metals enter substitutionally or interstitially into the crystalline lattice of the initial or final products. For the Ti- activated NaAlH4 and (LiBH4+0.5MgH2), amorphous TiAl3 and TiB2 alloys are formed, which are almost invariant during cycling. The Ni doped (LiBH4+0.5MgH2) initially forms amorphous Ni3B, which is partly converted to amorphous Mg2NiHy upon hydrogen loading. Local structure around Ti(Ni) atoms is expressed in terms of a cluster expansion and the interatomic distances, coordination numbers and Debye-Waller factors are determined for competitive structural models. For Ti-activated NaAlH4 the models are elaborated by Ti K-edge XANES, which are interpreted in terms of single-electron multiple scattering calculations. Structural properties and phase stability of hypothetical hydrogenated TiAl3 as well as several products of the decomposition reaction are determined from density functional theory calculation. First-principles molecular dynamics simulations of surface diffusion and chemical reactivity imply that the formation of a few monolayers of TiAl3 on the surface may be responsible for the significant increase in the reaction rate.