Food that was left under ones bed can be made tahar through tovelling in a mikveh, can this be done on Shabbos?
Yes, this is fine.
There is no real need for a Mikva here, and a number of poskim write that one can wash the food three times (see Shilhi De-Kaita, no. 36, and sources cited therein).
In addition, there is no real prohibition on the food, and many are lenient, in particular today (see Shut Tiferes Tzvi no. 91; see also here).
Therefore, the case is far removed from the concept of tikkun mana which applies to immersing new utensils (and which in any case doesn’t generally apply to foods; see Biur Halachah, Siman 318), and no prohibition will be involved.