OK - so the story of the companions in the cave (Qur'an 18:9-26) is basically a Rip van Winkle type story about some young chaps (the Qur'an version is non-committal about how many) who entered a cave and fell asleep for a long time (the Qur'an version is ambiguous about exactly how long stating variously "a number of years", "300 years" and "Allah knows best how long...") and were thus protected from persecution at the hands of those who worshipped Gods other than Allah. On awakening they discovered that they had been asleep for an extraordinarily long time.
The interesting thing here is that there are unquestionably Jewish and Christian connections to this account. In Islamic tradition, the account - along with most of this Surah - is given in response to questions posed by Muhammad's Quraysh tribesmen which they got from Jews in Medina with the specific purpose of catching Muhammad out. So certainly - this (Meccan) surah - quite early on - had a connection to other Abrahamic traditions - presumbly - if there is any truth in the Islamic tradition, the Jews expected that Muhammad would not be able to relate the account. But it seems they were wrong.
But what does that tradition tell us? Well at the very least it suggests that the Jews of Medina were familiar with this story BEFORE the Qur'an version was revealed - otherwise why would they have posed a question about it?
Of course we could argue that the story about the Medina Jews arming the Meccan Arabs with questions to catch Muhammad out was probably a later fabrication...but there is at least a suggestion that the story was already known...
...and of course it turns out it was already known. It was a story about a number of faithful Christians who had similarly entered a cave and gone to sleep for a very long time...etc. that had been circulating in several Syriac (and other) versions during the 6th century (see below *). These accounts varied in terms of the number of sleepers and other details and all that confusion is reflected in the Qur'anic version (see verses 21-26) but Muhammad makes that uncertainty itself a teaching point (which was a pretty clever retort to his questioners). The fact that the writer of the Qur'an is aware that there were "disputes" about the details suggests that he was not only aware of the story but, in fact was aware of more than one version of this mythical episode and of the differences between the different versions. It seems that by the 7th century when the Qur'an was being put together, this tale must have been pretty well known (in different versions) even in Arabia...
...and that being the case, is it not far more reasonable to suggest that its inclusion in the Qur'an is better explained by oral or written transmission from the earlier Christian tradition than direct divine revelation?
Clearly it is not true that these young men slept for 300 years so why would God reveal it as if it were fact - especially knowing that it had already caused "disputes" among Christians? The only remotely sensible explanation is that the Qur'an borrowed from Christian tradition and being unable to distinguish the relative authenticity and veracity of the various versions in circulation opted to make the key teaching point that "God knows best".
But wait - there's more - it wasn't even new when the Christians made up the story - they borrowed it from the Apostle Paul's source regarding the truthfulness (or rather lack thereof) of the people of Crete. Yes - good old Epimenides of Knossos, part of whose poem about Zeus found its way into the Christian canon of God's revealed word, was himself - according to Diogenes Laertius (1st century AD) - reputed to have nodded off in a cave for 57 years and then awoke to find the world had moved on without him. And if that tale originated anywhere near Epimenides actual lifetime, the fictional plot, if not the details, were already in existence 1000 years before the Qur'an!
Both Muhammad and the Christians should have been more careful in taking a Cretan's word for it (Titus 1:12).
More seriously - this brings me to a point that I feel needs to be made here. I fully admit that finding earlier versions of stories and traditions that later appear in the Qur'an (or the Bible or the writings of the Bab or Baha'u'llah etc.) does not prove that these writings were not received by divine revelation. But the point of this discussion is surely to prove that they were.
I know I said this earlier, but in this discussion, I feel it is only incumbent on the denier to establish "reasonable doubt" - its is extraordinarily difficult - even if the evidence is there to "prove" a negative anyway. On the other hand - all we need to prove the positive (i.e that Qur'an was divinely revealed) is to find just one part of the "revelation" that could not possibly have been derived from more mundane sources. So far nobody has done that. So far the opposite seems to be true - we have very little difficulty (although we may have to do a bit of reading) in finding perfectly plausible Christian/Jewish sources for even the most unfamiliar (to readers from a Christian and/or Jewish background) parts of the accounts.
*Excerpts from Seven Sleepers - Wikipedia
The story appeared in several Syriac sources before Gregory's lifetime. It was retold by Symeon Metaphrastes. The Seven Sleepers form the subject of a homily in verse by the Edessan poet Jacob of Saruq ("Sarugh", died 521), which was published in the Acta Sanctorum. Another 6th-century version, in a Syrian manuscript in the British Museum (Cat. Syr. Mss, p. 1090), gives eight sleepers. There are considerable variations as to their names...
The story rapidly attained a wide diffusion throughout Christendom, popularized in the West by Gregory of Tours, in his late 6th-century collection of miracles, De gloria martyrum (Glory of the Martyrs). Gregory says that he had the legend from "a certain Syrian".