Q, If the disciples were asleep during the Transfiguration (Luke 9:32), then who heard and recorded the conversation between Jesus, Moses and Elijah (Luke 9:31)? The same for Jesus’ prayer in Gethsemane (Matthew 26:36-46). There Jesus repeatedly found the disciples asleep, so who heard and recorded his prayers? Perhaps Jesus simply told them later on what had happened on both occasions, or the Holy Spirit inspired the gospel writers to know—but I would like to hear what you think!
I don’t think we need to posit that the Holy Spirit revealed these details supernaturally to the gospel writers after the fact. I think that one of the wonders of the Bible is that it was produced through the ordinary process of literary composition (just as it speaks through ordinary human language), and yet we recognize that God worked through that process to give us his word. Luke, for example, tells us at the beginning of his gospel that he carefully researched all of the materials in it. He was not dependent on divine revelation for the details.
So how do we explain the records in the gospels of conversations that Jesus had that took place while the disciples were asleep? I think that if we look at those records carefully, we will see that the disciples could have heard what Jesus was saying, or that Jesus would have had reason to tell them what he had been saying, even if the gospels don’t say that specifically.
The gospels tell us that when Jesus went to Gethsemane with his disciples, he left the main group of them and brought Peter, James, and John with him to another part of the garden to pray. Luke tells us that he then went a short distance from them (a “stone’s throw,” about 50 feet) to pray by himself, but he asked them to be praying along with him.
The book of Hebrews indicates that Jesus prayed aloud, loud enough to be heard from that distance. Speaking of his sufferings, it says, “During his earthly life, he offered prayers and appeals with loud cries and tears to the one who was able to save him from death, and he was heard because of his reverence.” The author of Hebrews acknowledges not being an eyewitness to the ministry of Jesus but having learned about Jesus from those who had heard and seen him. But somehow this tradition about what happened in the garden was passed on down to followers of Jesus. If we connect the dots, we can conclude that from 50 feet away, the disciples could well have been able to hear the “loud cries” of Jesus as he prayed.
Jesus prayed longer and more fervently than these three disciples, so that when he returned to them he found them asleep, but that does not mean that they fell asleep the minute he left them and heard nothing the whole time Jesus was away. A further possibility is that the gospels are only giving us a brief summary of what Jesus said when he returned and found the disciples asleep, and that he may actually have told them what he had been praying. It would have been natural for him to do that. The gospels don’t record him doing that, but we can infer that this is a possibility from the fact that what he was praying became known. So one way or the other, I don’t think we need to posit divine revelation to the gospel writers of what Jesus was praying.
The case of the Transfiguration is similar. Luke relates how Jesus brought Peter, James, and John with him up onto a mountain. He then tells how Jesus’ appearance and clothing changed and became gloriously bright, and how Moses and Elijah appeared and spoke with Jesus “about his departure, which he was about to bring to fulfillment at Jerusalem” (that is, about his coming sufferings, death, and resurrection). Luke then notes that “Peter and his companions were very sleepy, but when they became fully awake, they saw his glory and the two men standing with him.” I think we should understand this to mean that they had more than a momentary glimpse, because Luke records that Peter spoke about making shelters only “as the men were leaving Jesus.” So I think we should understand that these three disciples were able to observe the glory of Jesus and hear his conversation with Moses and Elijah for some time, long enough to know what they were talking about.
I hope these observations help answer your question. Thank you.