If I understand the Rogatchover correctly, the Rambams cited in the previous post represent two different dimensions of hilchos sukkah. In 6:5 the Rambam is describing the physical entity of sukkah. The Rambam deliberately does not mention sleeping in the sukkah here as the gemara in Eiruvin defines a person’s place / residence not as the location he/she sleeps in, but the location he/she eats in. The use of the term "dar" and not "yashein" in this context is precise.
In halacha 6:6 the Rambam is simply enumerating those activities which must be performed in the sukkah, and here the Rambam includes sleeping in the list.
(The Mefa'aneiach Tzefunos seems to suggest the Rogatchover intended to distinguish between dirah, which is a kiyum mitzvah, and not sleeping outside sukkah, which is a prohibition but not a chiyuv in and of itself, but in light of the citation of the gemara in Eiruvin I think this formulation fits better.)