Food that is under the bed:
One may not place cooked foods [or other foods, even raw] and liquids under a bed.
If the food or liquid is covered: One may not place foods or liquids under a bed even if the food/liquid covered with a metal vessel.
Bedieved: In the event that one transgressed or forgot and placed food under the bed, some Poskim rule the food is permitted to be eaten. Other Poskim rule the food is forbidden to be eaten and is to be discarded in an area where people will not be able to access. The main opinion follows the lenient opinion. Nevertheless, the practical directive of the Chabad Rabbeim was not to eat such foods and so is the accustomed ruling amongst Chabad Rabanim.
 Michaber Y.D. 116/5; Admur in Shemiras Hanefesh Vehaguf Halacha 7; Rambam Rotzeiach 12/5; Pesachim 112a; Yerushalmi Terumos 8/3; [This sentence, including all the parentheses, is the exact wording of Admur. Without the parentheses is the wording of the Michaber]
 Admur ibid; Pesachim ibid
 Implication of Admur ibid; Gr”a, brought in Binas Adam on Chochmas Adam 68/63, brought in Pischeiy Teshuvah 116/5; Or Yitzchak 14, brought in Darkei Teshuvah 116/36 and Kaf Hachaim 116/40; Igros Moshe Y.D. 3/20
Other opinions: Some Poskim rule it is permitted to place raw [uncooked] foods under the bed as the prohibition applies specifically with cooked foods [Implication of Michaber ibid; Aruch Hashulchan 116/11; Mili Dechasidusa 458; Kaf Hachaim 116/40]
 The reason: This due to that an evil spirit dwells on foods and liquids that stay under the bed. [Admur ibid; Michaber ibid; Raavad ibid; Pesachim ibid] Alternatively, the reason is because perhaps a damaging item will fall into the food and one will not notice. [Rambam ibid]
May one place food under the bed on the night of Pesach? Some write that on the night of Persach one may even initially place food under the bed as it is Leil Shmiurim and the evil spirit does not have permission to reside on the food. [See Hakashrus 18/26 footnote 109]
 Admur ibid; Shach 116/4; Peri Chadash 116/6; Pesachim ibid; Chochmas Adam 68/3; Aruch Hashulchan 116/11; Or Yitzchak 14, brought in Darkei Teshuvah 116/36; Poskim brought in Kaf Hachaim 116/41
Other opinions: Some Poskim rule that if the food is found in a vessel it is more lenient to be permitted. [Mili Dechasidusa 458, brought in Darkei Teshuvah ibid]
 Shvus Yaakov 2/105; Pischeiy Teshuvah 116/4; Chayeh Adam 2/2; Glosses of Rav Akiva Eiger 116/7; Yad Efrayim 116/5; Arugas Habosem 6/1; Shem Aryeh 14/12; Mili Dechasidusa 458; Poskim brought in Darkei Teshuvah 116/35 and Kaf Hachayim 116/44; Yabia Omer Y.D. 9-10
 The reason: As it is the Sages only initially forbade placing the food and drink under the bed, however Bedieved the food is permitted. [Shvus Yaakov ibid, based on Tur Y.D. 6 in name of Baal Haitur and Baba Basra 58 in Pirush Rashbam]
 Birkeiy Yosef 116/10 in Shiyurei Bracha; Zivcheiy Tzedek 116/28; Ben Ish Chaiy Pinchas 14; Gr”a brought in Binas Adam 63, brought in Pischeiy Teshuvah 116/5 and in Shaareiy Rachamim 156/2 in name of Binyan Olam that the Gr”a forbade liquor that was left in a cabinet that one slept on top of [brought in Darkeiy Teshuvah 116/38]; However see Darkei Teshuvah 116/35 that the Gr”a was stringent only upon himself while to others he ruled leniently and would tell them to eat the food; Avnei Yishpa 1/141 that Rav SZ”A and Rav Aba Shaul ruled to forbid it even Bedieved [brought in Hakashrus 18 footnote 103]
 Kaf Hachaim ibid that so rule majority of Poskim and if the stringent opinions would have seen all the Poskim that are lenient they would not have been stringent, and certainly one may be lenient in a time of great loss, or if there is another reason to be lenient, such as by raw foods, or if the food was not actually on an earth floor; Sefer Hakashrus 18/25 [p. 435] rules that the Poskim have ruled that Bedieved it is allowed, and especially in a case of loss, although when applicable, one is to wash the food three times.
 See Igros Kodesh Rashab 1/134; Directive of Tzemach Tzedek and Rebbe Rashab as recorded in the stories below, heard from Rav Eliyahu Landa Shlita
Tzemach Tzedek: The Tzemach Tzedek once witnessed his helper going to eat food that was left under the bed. The helper said to the Tzemach Tzedek “Rebbe, I do not fear the evil spirit.” The Tzemach Tzedek replied “Fool, fool, Do you know what an evil spirit is? It causes you for three days to not want to learn or Daven.”
Rebbe Rashab: A person once asked the Rebbe Rashab what to do with food left under his seat on the train, if he fell asleep during the ride, and the Rebbe Rashab replied that the food may be eaten as the entire issue is only a bed that one slept on. See also Igros Kodesh ibid in which the Rebbe Rashab asked Rav Y.M. Bespalov for a Halachic ruling on Tabaco that was left under his bed, hence implying that certainly by food and drink we are stringent.
 The reason: It is proper to avoid eating the food or drink due to it being damaging to one’s spiritual health, as brought in the story with the Tzemach Tzedek, recorded above.
I have a quextion about water left uncovered o er night nidda 17. Does it still apply? Is it only when in metal klis. Does covering help? Regrigerator? What abiut a coke can.
See here https://shulchanaruchharav.com/halacha/liquids-left-uncovered/?hilite=uncovered+water