Another interpretation: Why was He revealed to him (that is, to Balaam) at night? He was not fit for the Holy Spirit [except at night], because with all the prophets of the worshippers of stars He speaks at night. And so Eliphaz says (Job 4:13): "Amid disquieting thoughts from visions of the night."
Why God Spoke to Balaam Only in the Night Visions
Midrash Tanchuma Buber, Balak 11:2
ד"א למה נגלה עליו בלילה, לא היה ראוי לרוח הקודש [אלא בלילה], לפי שכל נביאי העובדי כוכבים בלילה מדבר עמם, וכן אליפז אומר בשעיפים מחזיונות לילה (איוב ד יג).