This study examines the structural, electronic, optical, elastic, thermodynamic, and hydrogen storage properties of KSrZH6 (Z = Rh, Ir) utilizing density functional theory to explore their potential as hydrogen storage materials. The structural analysis confirms that all the studied materials crystallize in the cubic phase with space group 216 (F ̄ 43m). The phonon dispersion and ab initio molecular dynamics (AIMD) computations reveal dynamic and thermal stability for both compounds. In addition, the electronic structures exhibit indirect semiconducting properties, with an extensive hybridization near the Fermi level between 1s-orbitals of hydrogen (H), and d-orbitals of the transition metals (Rh and Ir). Furthermore, optical investigations reveal significant UV absorption, as well as a moderate refractive index and reflectivity, which can be useful in optoelectronic devices. All of the studied materials possess mechanical stability and show brittle properties. Among the compounds, KSrRhH6 exhibits the highest gravimetric hydrogen storage capacity of 2.57 wt.%, while KSrIrH6 shows a slightly lower value of 1.86 wt.%. The storage capacity decreases when the cationic atom Rh is substituted with Ir, attributed to variations in atomic radius. This comprehensive study underscores the promising potential of KSrZH6 (Z = Rh, Ir) for both hydrogen storage and optoelectronic applications.