Covering Seforim and Turning Them Upside-Down — Eruvin 98a
תלמוד בבלי מסכת עירובין דף צח/א
חוץ לארבע הופכו על הכתב
רש"י עירובין דף צח/א
להפוך - יריעת קלף על פניה להגין עליה שלא יעלה אבק על האותיות:
The Shulchan Aruch (Yoreh Deah 297:1), on the basis of our Gemara, rules that a scribe who has written a scroll for a Sefer Torah and must now leave it to dry should not turn it upside down — even if he is doing so to protect it from dust — because this is degrading the scroll. Rather, he should leave the scroll right-side up and cover it with a cloth.
The Shach (loc. cit.) writes that the Bach in the name of the Yerushalmi (Megillah) maintains that a person should never leave a room leaving a book uncovered — and not just a Sefer Torah, but also other Seforim. The Shach himself writes that this is evident from our Gemara, independently of the Yerushalmi. He continues to write that it is "known" that there is an angel called SHeD — Shin-Daled, short for SHomer Dapim — that causes anyone who leaves an open Sefer to forget his learning.
The Bigdei Shesh suggests that the question of whether there is an obligation to treat Seforim other than those that contain passages from Tanach depends on the interpretation of the Yerushalmi here, Eruvin 10:3 (60b). The Yerushalmi here says: ר' יוסי אומר בשם ר' יוחנן לא סוף דבר ספר אלא אפילו פסוקיא — R' Yose in the name of R' Yochanan said: Not only a Sefer, but even Pesukya. Some authorities (such as Korban HaEdah, Pnei Moshe and Mashbi'ach) understand Pesukya to refer to selections of pesukim, as opposed to entire Sifrei Kodesh. Other authorities (such as Gilyonei HaShas and Sha'are Toras Eretz Yisroel) understand Pesukya to refer to a belt.
According to the former authorities, it would seem that the Yerushalmi is limiting the permissibility to roll up the spooled-out scroll back to scrolls that contains sections of Tanach — implying that any Sefer of lesser sanctity need not be treated as respectfully.
However, according to the latter authorities, the Yerushalmi even permits one to roll back a spooled-out belt — implying that certainly anything of greater sanctity — and certainly Seforim can be rolled up out of respect.