Q. The Gemara in Yoma says not to sleep with shoes. Does this apply when falling asleep on a train, or at one’s shtender, or only in bed?
A.   Indeed Talmud (Yoma 78b) quotes Shmuel’s teaching; that one who wishes to experience the taste of death, should put on shoes and go to sleep. Minchas Bikurim (Tosefta Yoma 4: 1), Kaf Hachaim (Y.D. 116: 211) Salmas Chaim (2: 122), and others  maintain that it is prohibited to sleep with shoes on because of the danger (according to some, of contamination) involved.
Rashash (Yoma ibid.) wonders on the Sefer Haterumos quoted by Beis Yosef (O.H. 316) and the Hagra (ibid. 6), who mention that Talmidei Chachamim, would sleep with their shoes on during the week.
Chashukei Chemed (Yoma ibid.) refers a similar shaila regarding a doctor who wants to catch a short sleep to refresh himself, when on hospital duty, and be ready for any emergency, he therefore keeps his shoes on, if that is proper. He maintains that if it is done for a short period of sleep, it is permitted, as is the case with the Talmidei Chchamim, who because of their devotion to Torah learning, would avoid sleeping in bed during weekdays.
Horav Shlomo Miller’s Shlit’a opinion is similar.
Rabbi A. Bartfeld as advised by Horav Shlomo Miller and Horav Aharon Miller Shlit’a