The Messenger of Allah ﷺ forbade a man from sleeping on a rooftop that has no surrounding wall.
حدثنا إسحق بن موسى الأنصاري حدثنا عبد الله بن وهب عن عبد الجبار بن عمر عن محمد بن المنكدر
نهى رسول الله ﷺ أن ينام الرجل على سطح ليس بمحجور عليه
No references are available.
[Hasan] It has supporting narrations in Abu Dawud, no. 5041, and Ahmad 5/79, 271, and others.