If Jesus Christ was alone in the Garden of Gethsemane and was immediately taken into custody, how do you think we have a record of his exact words?
Jesus brought three witnesses with him to the Garden of Gethsemane: Peter, James, and John. John is the source of his own gospel, where the garden account is sacredly shrouded. All he has to say on it is “he went forth with his disciples over the brook Cedron, where was a garden, into the which he entered, and his disciples” (John 18:1). Peter’s account is captured by his mission companion, Mark, and was probably the source Matthew relied on for his gospel. In this account, the chosen apostles hear three prayers given by their Master. This record, however, is imperfect, as it confesses that the witnesses slept through much of what there transpired (Mark 14:33-42).
Luke approached his gospel as something of a historian. He gathered as many eyewitness accounts as he could and differs slightly from the other synoptists. He doesn’t single out the chosen apostles, but does note that Jesus is about “a stone’s cast” from the observers. Luke also adds the visit of the angel strengthening the Mediator, and His sweat of blood (Luke 22:39-46). In interviewing the apostles, Luke may have interviewed Peter, James, and John and gotten these additional details from them. Or, given how central the Atonement was to Christ’s mission and how essential it is for all His creation, the events of the garden may have been revealed during the 40 day ministry (the period after the Resurrection when gave His disciples special instruction). John (an eyewitness for both the atonement and the 40 day ministry), Matthew (as an apostle present during the ministry and associate of the 3 eyewitnesses), and Mark (companion to Peter – eyewitness of both events, and probably an attendant of the ministry) should have each had access to this same information if this was indeed Luke’s source. It’s possible that for whatever reason the witnesses felt that such knowledge should not be written (though it could be shared orally with true believers) while Luke disagreed. Or it could also be that Luke’s account came late in the synoptic game and he was directed to include this information so it wouldn’t be lost.
Orson F. Whitney provides another possible source for learning the events in that sacred garden. Bryant Hinckley, in “The Faith of Our Pioneer Fathers” cites a dream that Elder Whitney had of this singular experience.
“I seemed to be in the Garden of Gethsemane, a witness of the Savior’s agony. I saw Him as plainly as ever I have seen anyone,” he relates. He describes the prayers the same as the synoptists. “As He prayed the tears streamed down His face, which was toward me. I was so moved at the sight that I also wept, out of pure sympathy.” Following each prayer, the Savior returned and awoke the sleeping apostles. “Three times this occurred, until I was perfectly familiar with His appearance– face, form and movements. He was of noble stature and majestic mien” (pages 211-213).
Elder Whitney’s account adds the detail of our Lord’s tears and a fence (meaning it was a private garden), but there’s so much more in this retelling. The key here, especially as it relates to your question, is that a generous Father in Heaven is willing to share the knowledge of these events to those who will seek.