There are a lot of contradictory narrations in the ahadith and sirat about the coming of the revelation to Muhammad. I would like to suggest that only one chronology makes sense, though.
Muhammad felt that his annual vision-retreat at the cave of Hira was very important. He would periodically go home and get supplies during the day while he was a Hira, but he would spent every night there in hopes of getting more vision-dreams. His nephew Ali was with him but no one else, according to the most “authentic” sources.
When the terrifying vision came to Muhammad, containing Surah 96:1-5, Ali (of course) saw nothing. Muhammad fled back to Khadija and told her the story. She was concerned but reassured him that nothing could be wrong. He went back to Hira for more visions the next night. Meanwhile, the content of the message caused Khadija to wonder if it didn’t come from the Creator God, and she consulted her cousin Waraqah, who found this plausible and supposed the Muhammad was being commissioned as a prophet.
Muhammad got no more visions for several nights. At the end of the Hira, he went to return to Khadija’s house, and on his way, he saw a Merkabah-like vision of a Power sitting on a throne. In terror again, he ran home. There, he wraps up in his cloak and receives Surah 74:1-5, which is why some people thought this was the first surah.
After this, Khadija tells Muhammad what her cousin said. Muhammad meets Waraqah in person at the Kaaba, and he hears first-hand about Moses and the burning bush, the doctrine of Torah mi-Sinai, and the idea from Stephen’s sermon in Acts that prophets were assisted by angels, which he took very literally.
Muhammad is still worried about his own sanity, however, and so the first part of Surah 68 is revealed next.
Waraqah soon dies, and the prophesies stop, and Muhammad attempts suicide repeatedly, to be stopped by the voice returning and telling him that he is Allah’s prophet and Jibril is speaking to him.