The food does not need to be purified.
Although there are minority opinions that say one should dispose of the food, the general consensus is that one may eat it.
See http://doseofhalacha.blogspot.co.uk/2014/05/food-under-beds.html
R’ Ovadia Yosef (Yabia Omer 1: YD 9) writes that as the Vilna Gaon and many others were stringent, if one did inadvertently place food under a bed, one should dispose of it. If the food was expensive, however, one may rely on the more lenient authorities. There are other factors, however, which would make the food permissible, including if the food was raw, if it was a child’s bed, or a carpeted / tiled floor (Yabia Omer 1: YD 10; Tzitz Eliezer 10:35).
Most people follow other Poskim (Aruch Hashulchan YD 116:11; Pischei Teshuvah YD 116:4) who take a more lenient approach, and allow such food to be consumed.