Answer:
(Fatwa: 399/399/M=1431)
If the open terrace of the mosque is included in the boundary of legal mosque, then staying there is not allowed. Yes, stay there is only allowed for traveller or one in itikaf(seclusion in mosque with the intention of reward)
Allah (Subhana Wa Ta’ala) knows Best
Darul Ifta,
Darul Uloom Deoband
