The source for this is in the Mishnah Berurah:
ראוי לכל וכו' – והמקובלים האריכו מאוד בגודל מעלת קימת חצות כי רבה היא. וכבר נדפס בסידורים סדר ההנהגה על פי כתבי האר"י ז"ל. וזמן חצות הוא תמיד באמצעות הלילה ממש בכל מקום, ואפילו בלילות הארוכות או הקצרות. והיא י"ב שעות אחר חצי היום. והעת להתאונן על החורבן נכון יותר שיהיה קודם חצות מעט, ומחצות ואילך יעסוק בתורה, ובסוף הלילה יבקש צרכיו. ויש אומרים אז "שומרים לבוקר". ואם הוא קרוב להנץ החמה, יאמר המזמורים לבד וידלג הקינות, ואחר כך יאמר "שומרים לבוקר". ואחר התיקון, שיעור משניות קודם לכל דבר. ואם זכה לחכמת האמת, עת ההיא מסוגלת מאוד. האחרונים קיבלו, מ"שכבי" עד "קומי", היינו משבועות שאומרים "שכבי" עד תשעה באב שאומרים "קומי", אין צריך לקום בלילה. ויש אומרים, מט"ו באב עד ט"ו באייר יקום. והנוהגים על פי קבלה סוברים שצריך לקום תמיד. חבורה שנתחברו יחד לומר תיקון חצות בציבור, אין למונעם, ואדרבה, ברוב עם הדרת מלך. וטוב יותר שיאמרו את התיקון בבית הכנסת משיאמרוהו בחדר הסמוך לו, דבית הכנסת קדיש טפי, וגם שיהיו מעשרה הראשונים. וצריך ביחוד להזהר מאוד מאוד משיחת חולין בניעורם בלילה. ומי שאינו יכול להשכים קודם אור הבוקר, מחמת שהוא חלש בטבעו, או שהוא יודע בעצמו שאם יקום באשמורת יישן בעת התפילה, מוטב לישן כל הצורך. ומכל מקום יהיה זהיר מאוד לקום שעה, ולפחות חצי שעה, קודם קריאת השַמָש לבית הכנסת, כדי שיהיה יוכל להכין עצמו להתפלל בציבור ובנקיות.
In short, this practice is found in the writings of the Kabbalists. If someone is not able to wake up so early, it is better that he sleep as much as he needs, as long as he wakes in time for shacharis in shul.
You could think of this practice as similar to the fasting certain great tzaddikim would do. They would only do it if it did not make their general performance of mitzvos suffer. It is also possible that they napped in the day.
As for lighting, presumably they had candles. Even if they were poor, presumably they budgeted for candles, as Hillel did for studying in the Beis Midrash.
To the poor person, the members of the court say: Why did you not engage in Torah? If he rationalizes his conduct and says: I was poor and preoccupied with earning enough to pay for my sustenance and that is why I did not engage in Torah study, they say to him: Were you any poorer than Hillel, who was wretchedly poor and nevertheless attempted to study Torah? 7They said about Hillel the Elder that each and every day he would work and earn a half-dinar, half of which he would give to the guard of the study hall and half of which he spent for his sustenance and the sustenance of the members of his family.