Focusing on the use of nanophosphors for in vivo imaging and diagnosis applications, we used thermally stimulated luminescence (TSL) measurements to study the influence of trivalent lanthanide Ln3+ (Ln = Dy, Pr, Ce, Nd) electron traps on the optical properties of Mn2+-doped diopside-based persistent luminescence nanoparticles. This work reveals that Pr3+ is the most suitable Ln3+ electron trap in the diopside lattice, providing optimal trap depth for room temperature afterglow and resulting in the most intense luminescence decay curve after X-ray irradiation. This luminescence dependency toward the electron trap is maintained through additional doping with Eu2+, allowing UV-light excitation, critical for bioimaging applications in living animals. We finally identify a novel composition (CaMgSi2O6:Eu2+,Mn2+,Pr3+) for in vivo imaging, displaying a strong near-infrared afterglow centered on 685 nm, and present evidence that intravenous injection of such persistent luminescence nanoparticles in mice allows not only improved but highly sensitive detection through living tissues.