The Prophet ﷺ said: If anyone spends the night on the roof of a house with no stone palisade, Allah's responsibility to guard him no longer applies.
قَالَ رَسُولُ اللَّهِ ﷺ مَنْ بَاتَ عَلَى ظَهْرِ بَيْتٍ لَيْسَ لَهُ حِجَارٌ فَقَدْ بَرِئَتْ مِنْهُ الذِّمَّةُ