Answered by Shaykh Faraz Rabbani
Would I have to spend the entire night at the Masjid until after Fajr prayer? Could I go late, say around 01:00? Could I go when it begins and leave around 02:00 and still receive my blessings of forgiveness from Allah?

Walaikum assalam wa rahmatullah,
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.
And Allah alone gives success.
Wassalam,
Faraz Rabbani