Yosef Karo, Translation:Shulchan Aruch — Orach Chaim 631…
“ There are those who say that this small space should not be empty space but must be wall or schach (Ros"h in the name of the R"i, Rambam ch. 4) . It must be 7x7 tefachim and taller than ten tefachim (Tur) . The walls, which are taller than ten, must also be made out of materials that can be used as schach (Ra"n the end of ch.1 of Sukkah) . If all of the walls are made of materials that can be used for schach one may sleep even under the walls (commentary of Rabbeinu Yerucham 1:1) . ”
