The Prestige Class Metaphysical Spellshaper (BoEF, p.81) has the ability to spontaneously cast metamagic spells, at the cost of suffering 1 ability damage per spell level the metamagic improves the base spell (and all the damage must be to the same stat at the same time).
The easiest way to go about avoiding this would be a Restoration spell (though it requires an additional DC 20 caster level check), but that only appears on the Cleric and Paladin spell lists. Going 10 ranks into Rainbow Servant is an option so you can cast Restoration on yourself, but it requires a lot of time and leveling. Another would be to carry a couple of Rods of Bodily Restoration (MIC p.173) or Orbs of Mental Renewal (MIC p.167). But is this the most effective way? Or are their other ways to do this?
Note: Books allowed are the BoEF itself and all the D&D 3.5e works. I'm looking for preferably a spell, but a magic item can also work. And no, convincing another party member to prestige into Divine Prostitute (BOEF, p.88) or haul one around as a follower is not an option.