By Rabbi Berach Steinfeld
The halacha in Yoreh Deah 117:5 says that one is not allowed to eat food that was kept under a bed overnight. Does this halacha still apply today?
The Gemara in Pesachim 112a says that a “ruach raah” (bad spirits) enters food and drink that was stored under a bed overnight. This is so even if the food is enclosed in a metal container. Due to the “ruach raah,” one may not eat it. According to this Gemara the halacha still applies today.
The Rambam in Hilchos Rotzeach 12 mentions a different reason why food under the bed is forbidden. This is so because we are worried that something will fall into the food, and one may not see it fall in because the food is under the bed. The Prisha in Yoreh Deah 117 says that based on this Rambam one would not have a problem eating from food under the bed, since one does not eat on a bed and when he brings the food to the table he will see if there is a foreign object in the food.
The Raavad argues with this Rambam and says that in the Yerushalmi (and also in Bavli) we see that the reason for this prohibition is because of “ruach raah” (bad spirits) so it should be forbidden in our times also.
Without going into details of how to answer this Rambam, one could differentiate between the Rambam and the Raavad in a few different circumstances. Let’s look at a scenario of someone who puts food under a bed and pulls it out before he goes to sleep. If the reason for the prohibition is due to bad spirits, then it would not apply in this case. If the reason for the prohibition is that something might fall on it, then it would still apply. This is especially so in sleep away camp where people end up eating on their beds.
Another scenario that shows the difference would be if a goy keeps food under his bed. If the reason for the prohibition is due to bad spirits, it would not apply as a goy does not need to wash netilas yodayim in the morning. If the reason for the prohibition is because of foreign objects falling into the food, it would apply if you eat on that bed.
What is the halacha concerning food that is kept under a couch? Perhaps another person sleeps on the couch without the owner’s permission. The halacha for such a scenario is “ein adam osseir dovor sh’eino sh’lo” (A person can’t make something forbidden that which does not belong to him.) If the reason for the prohibition is because of bad spirits, then the person who slept on the couch without permission, or placed food under the couch without permission would not be able to cause the food to have bad spirits. If the reason for the prohibition is like the Rambam, then it is a physical problem and eating the food under the couch would be forbidden.
In a related discussion about bad spirits, we can mention the issur of sleeping alone. One is allowed to sleep alone in the Sukkah on Sukkos in contrast to the rest of the year when one should not sleep by himself as it is a sakana. The reason it is permissible on Sukkos is because of the rule, “Shommer mitzvah lo yeida dovor ra” (one who does a mitzva is protected from all evil. If the reason why food is prohibited is because of bad spirits, it would seem to be permissible to have food under the bed on Sukkos. The same ruling might apply on the first night of Pesach as there is a special protection on Pesach night as we see in the name; “leil shimurim”  (The protected night).
It is not worth the chance of partaking of food that was stored under a bed. This is so even when there is special protection like on Sukkos or the first night of Pesach. The special protection is only effective against “mazikin” (Demons) and not for “ruach raha” (Bad spirits). It is definitely not worth losing sleep over it.