Even nights are hot in Jerusalem this week.
IF my roof were flat, I would prefer to sleep on it instead of in the warm house.
In Biblical days the flat house roofs were like an outdoor room, used for many tasks, including sleeping.
So the Bible, in Deuteronomy 22:8, gave us a good "building code":
"When you build a new house, you shall make a parapet for your roof, so that you will not bring bloodguilt on your house if anyone falls from it."
In Jerusalem we still take that law seriously. Here are some examples of parapets:
David's Village, Mamilla
An old synagogue being repaired in Nachlaot
Israel Broadcasting Authority building (formerly Shaarei Zedek Hospital)
In a very Orthodox neighborhood