Shlomo A Source for Simchat Torah
"Shlomo awoke and behold it was a dream." (Melachim I 3:15)
How can one be awake and still dreaming?
The solution offered by the Midrash to this mystery is that when Shlomo awoke in the morning something happened which demonstrated to him that the dream he had experienced the night before had come true.
In his dream G-d appeared to the king and asked him what he wished to be granted from Heaven. Shlomo did not ask for long life, wealth or power, rather for the wisdom of "an understanding heart" which would enable him to properly rule such a challenging nation from the throne he had inherited from his father David at such a young age. This found favor in the eyes of G-d who promised him wisdom surpassing that of anyone before or after him.
Upon arising Shlomo heard birds chirping and donkeys braying. When he sensed that he was able to comprehend the language of these creatures he realized that his dream had come true. He then came to Jerusalem and made a great feast for all of his servants.
This is the source, concludes the Midrash, for celebrating the completion of Torah study. Just as Shlomo realized that a feast was in order upon gaining such great wisdom, so too do Jews who complete an entire year of publicly reading the entire Sefer Torah, portion by portion, celebrate their acquisition of wisdom with singing, dancing and feasting on Simchat Torah. This is also the source for the festive meal which celebrates the siyum completion of an entire tractate of the Talmud.