Shulchan Arukh, Orach Chayim 627:1שולחן ערוך, אורח חיים תרכ״ז:א׳
The Laws of Sitting in the Sukkah, 4 Seifim:1. One must sit in the air of the sukkah (i.e. directly under the space of the s’chach). One who sits under a bed in the sukkah - if it is higher than 10 tefachim he has not fulfilled his obligation. (Note: Therefore a person who sleeps in a sukkah under a bed that is ten handbreadths high has not fulfilled his obligation)
Chokhmat Shlomo on Shulchan Arukh, Orach Chayim 627:1חכמת שלמה על שולחן ערוך, אורח חיים תרכ״ז:א׳
...