• A non-invasive, real-time optical monitoring strategy for the state of hydrogen in MgH2 is proposed, combining DFT-based optical calculations with experimental reflectance measurements.
• Strong linear correlations between SOH and optical parameters (reflectance at 1200 nm and 550 nm, refractive index at 250 nm) were established with R² > 0.99 and MAE < 0.05.
• Reflectance at 940 nm decreases consistently with increasing hydrogen uptake, enabling direct optical quantification of hydrogen content.
• The optical response is driven by band structure evolution and electron density redistribution, paving the way for spectroscopic SOH sensors in next-generation hydrogen energy systems.