The Apostles would have heard what Jesus said in prayer. We only have a very small amount of what Jesus prayed in the Garden. It can be supposed that the apostles heard Jesus praying what we have written in Scripture before they fell asleep. There is probably a lot more to the prayer of Jesus than we have recorded. Or, that may have been all that was audible to the Apostles, and because the prayer of Jesus grew quiet, they fell asleep.
The visionary, Mother Mary Agreda writes that Jesus prayed especially hard for the reprobate, which caused him to sweat blood, that his suffering would not be in vain, but would save them. That is the cup he would have to drink, and that is why He said “Yet not my will, but Thine be done.”