Answered by Shaykh Faraz Rabbani
Question : Do I have to spend the entire night at the Masjid from Maghrib until after Fajr prayer to get the reward of Laylat al-Qadr? Could I leave early and still receive my blessings of forgiveness from Allah?
Answer : One attains unto the reward of worshipping on the Night of Power through any worship one does that night. The most important is to strive ones utmost to perform Isha and Fajr in congregation. After that, the most important of spiritual actions on that night is sincere repentance: one should seek to return to ones Lord through making the firm commitment to leave ones state of heedlessness and disobedience and make the commitment to turn ones heart in the direction of Divine Pleasure.