The Ben Ish Chai (a”h), states that one should not wear shoes while sleeping. This is also mentioned by Rav Yaakov Chaim Sofer (a”h), in his work Kaf Ha’Chaim. The reason is that by sleeping with shoes on, one “experiences the taste of death.” Although we do not know precisely to what this refers, it is certainly something that we wish to avoid. Furthermore, the Kaf Ha’Chaim cites authorities who assert that sleeping while wearing shoes can adversely affect one’s memory. Therefore, before going to sleep one must ensure to remove his shoes.
Rav Chaim Kanievsky writes that this applies to children, as well. Parents must ensure that their children’s shoes are removed when the children sleep. Even if the child is still very young and has yet to reach the age of Mitzvah training, he or she should not sleep with shoes because this may affect the memory.
This Halacha applies to all kinds of shoes, including sandals and slippers.
There is considerable discussion among the authorities as to whether this applies only to a regular, full sleep, or even to a short nap. It is questionable whether one may keep his shoes on if he sleeps for a period that is shorter than “Shitin Nimin” (literally, “sixty breaths”). Furthermore, many different views exist in defining the term “Shitin Nimin.” The Shaarei Teshuvah commentary states that it refers to less than three hours. The Chid”a (a”h), in his sefer Machazik Berachah, states that this period is slightly longer than a half-hour. In light of these controversies, it is uncertain whether this Halachah of removing one’s shoes before sleeping applies when a person naps on a train, in a car, or on the couch for a short while.
What is clear, however, is that before a person goes to sleep he should remove his shoes, and should also ensure that his children’s shoes are removed before they go to sleep.