The ikar source in Nach for this is a possuk in Eichah 2:19:
ק֣וּמִי ׀ רֹ֣נִּי בליל [בַלַּ֗יְלָה] לְרֹאשׁ֙ אַשְׁמֻר֔וֹת שִׁפְכִ֤י כַמַּ֙יִם֙ לִבֵּ֔ךְ נֹ֖כַח פְּנֵ֣י אֲדֹנָ֑י שְׂאִ֧י אֵלָ֣יו כַּפַּ֗יִךְ עַל־נֶ֙פֶשׁ֙ עֽוֹלָלַ֔יִךְ הָעֲטוּפִ֥ים בְּרָעָ֖ב בְּרֹ֥אשׁ כָּל־חוּצֽוֹת
Arise, cry out in the night At the beginning of the watches, Pour out your heart like water In the presence of the Lord! Lift up your hands to Him For the life of your infants, Who faint for hunger At every street corner.
And in Iyov 35:10:
וְֽלֹא־אָמַ֗ר אַ֭יֵּה אֱל֣וֹהַּ עֹשָׂ֑י נֹתֵ֖ן זְמִר֣וֹת בַּלָּֽיְלָה
But none says, “Where is my God, my Maker, Who gives strength in the night
The ikar sources in Chazal (referencing the above possuk) for this concept are in Eruvin 18b:
אמר רבי ירמיה בן אלעזר כל בית שנשמעין בו דברי תורה בלילה שוב אינו נחרב שנאמר ולא אמר איה אלוה עושי נותן זמירות בלילה
And Rabbi Yirmeya ben Elazar also said: Any house in which the words of Torah are heard at night will never be destroyed, as it is stated: “But none says: Where is God my Maker, Who gives songs in the night”
And Eruvin 65a:
אמר רב יהודה לא איברי ליליא אלא לשינתא אמר רבי שמעון בן לקיש לא איברי סיהרא אלא לגירסא אמרי ליה לרבי זירא מחדדן שמעתך אמר להו דיממי נינהו
אמרה ליה ברתיה דרב חסדא לרב חסדא לא בעי מר מינם פורתא אמר לה השתא אתו יומי דאריכי וקטיני ונינום טובא אמר רב נחמן בר יצחק אנן פועלי דיממי אנן רב אחא בר יעקב יזיף ופרע
Rav Yehuda said: Night was created only for sleep. Rabbi Shimon ben Lakish said: The moon was created only for Torah study by its light. When people said to Rabbi Zeira: Your teachings are exceedingly sharp, he said to them: They were formulated during the daytime hours. This teaches that Torah study during the day is most beneficial to clarity of the mind.
Rav Ḥisda’s daughter said to her father, Rav Ḥisda, who would spend his nights in study: Doesn’t the Master wish to sleep a little? He said to her: Days that are long in quantity but short in the opportunity to study Torah and perform mitzvot will soon arrive, and we will sleep a lot. After I die, there will be more than enough time for sleep.
Rav Naḥman bar Yitzḥak said: We, Torah scholars, are day workers, as our study is performed primarily during the day. The Gemara relates that Rav Aḥa bar Ya’akov would borrow and repay, i.e., if for some reason he neglected to study during the day, he would use the night hours to compensate for the missed time.
Shulchan Aruch OC 238 brings the idea of learning at night down b'halachah:
צריך ליזהר בלמוד הלילה יותר מבשל יום והמבטלו עונשו מרובה:
אם יש לו חק קבוע ללמוד כך וכך ליום והיה טרוד ביום ולא השלימו ישלימנו בלילה מיד:
One needs to be careful to learn at night more so than the day, and the one that wastes his learning time night, his punishment is great. However, if he has an established time to learn during the day, and he did his best to complete his learning [and did not], he should finish it immediately at night.
And in Shulchan Aruch YD 246:
מי שרוצה לזכות בכתרה של תורה יזהר בכל לילותיו ולא יאבד אפי' אחת מהן בשינה באכילה ושתיה ושיחה וכיוצא בהם אלא בדברי חכמה ותלמוד תורה: הגה כי אין אדם לומד רוב חכמתו כי אם בלילה (לשון הטור מרמב"ם) ויש לאדם להתחיל ללמוד בלילה מט"ו באב ואילך ומאן דלא מוסיף כויסיף (נ"י פרק יש נוחלין וש"ס ורמב"ם [*ליתא ברמב"ם] שם דף קכ"א ע"ב וסוף תענית ע"ש):
One who wants the zechus of the Crown of Torah should be careful to learn all of his nights, and not to lose our even one moment of then with sleeping, eating and drinking, etc. Rather, he should use them for wisdom and learning Torah.
Rema: (Tur and Rambam say) that the majority of a person's wisdom comes at night, and a person should begin his learning in the evening's [when the nights start to get longer] from the 15th of Av and onwards, and one who has not added on to his learning should do so.
The Shach says there:
יזהר ככל לילותיו כו'. כתב הפרישה נ"ל כל לילותיו כמשמעו דאפי' בלילי תקופת תמוז הקצרים גם כן ילמוד אחד המרבה ואחד הממעיט מכל מקום ילמוד מעט ומ"ש (בערובין ד' ס"ה ע"א) לא איברא לילה אלא לשינתא ומוקמא לה (תוס' שם) בלילי תקופת תמוז נראה לי שר"ל דאז יהיה לו עיקר הלילה לשינה ועל דרך שאמרו לא איברא סיהרא אלא לגירסא ומוקי לה בלילי תקופת טבת הארוכי' ובודאי אז גם כן צריך לישן ולא ילמוד כל הלילה אלא רצה לומר העיקר יהיה לו אז ללמוד מחמת אריכות הלילות ועיין בא"ח סימן רל"ח:
A person should be careful to learn all of his nights - The Prishah writes, and it appears to me that when it says "all of his nights", that it means even in the time of Tammuz where the days are short he should also learn. Whether he learns a lot or a little, his should at least learn a little. And as it says in Eruvin [quoted above] that "Rav Yehuda said: Night was created only for sleep. Rabbi Shimon ben Lakish said: The moon was created only for Torah study by its light." It appears that what we mean is, during the short nights around Tammuz (in the summer), the ikar is sleep, while during the long nights around Tevet, obviously he needs to sleep, but those nights should be spent mostly learning.
Now the Mishnah Berurah (there) brings in these sources and a few more, in both pesukim and Chazal. Here, on the second halachah in the SA, he answers your second question:
עונשו מרובה - ... ועיין במ"א דלשינת האדם בלילה אין לזה שיעור קבוע אלא תלוי בכל אדם לפי כח בריאותו ועכ"פ לא ישתקע בשינה יותר מדאי וכדאיתא במשנה [סנהדרין פ"ח] שינה לצדיקים רע להן ורע לעולם ופירש"י מפני שאינם עוסקין בתורה
His punishment is great: ... The Magen Avraham states that there is no set amount for sleeping, rather, it depends on the person according to his strength. In any case, he should not indulge himself in sleep more than is necessary, as it says in Sanhedrin that sleeping is not good for Tzaddikim. Rashi explains because they are not involved in Torah [while asleep].
I mainly wanted to translate the main sources here for you so you could see them and investigate more per your liking. Note that there is more spoken of this in the Shulchan Aruch haRav (there is an English source for that here) and more in the Zohar. In the SA, many of the other nosei keilim (besides the Shach) speak on it. On the pesukim, the Shlah, Torah Temimah, and many others talk to this idea.
At the face of the matter, it appears the main idea is that one should yearn and strive to maximize his learning to the fullest during the gift we have of the 24 period of day and night (as we definitely have a chiyuv for the entire day "לֹֽא־יָמ֡וּשׁ סֵ֩פֶר֩ הַתּוֹרָ֨ה הַזֶּ֜ה מִפִּ֗יךָ וְהָגִ֚יתָ בּוֹ֙ יוֹמָ֣ם וָלַ֔יְלָה"). Instead of listening to his Yetzer Hara saying "night is dark and only for sleeping" (or nowadays where there are so many distractions that can take us away from learning), rather he should strive to maximize the time spent learning according to his strength (per the MB and the Shach). This is beside the other ideas that one's learning is stronger in the evening, and the Schechinah dwells with him, etc.
Additionally, I heard a beautiful idea (from the Mussar sefarim) that, at night, the sky "opens up" and one can see the now uncovered sky that is not anymore masked by the sun's light. This openness is representative of the fact that night is best for learning and doing cheshbon hanefesh when the world is "opened up" to him and the world is quiet.