In the Christian story of the “Seven Sleepers of Ephesus” a polytheist emperor of the Byzantine Empire sealed the exit of the cave to cause the 7 men to starve to death. God intervened, and put the 7 men into a state of sleep. Quran verse 18:11 can be interpreted to mean that Allah sealed the ears of the 7 men to put them to sleep for many years.
A Muslim website explains that the verse reveals the scientific fact, not known then, that hearing is the only sense active while you are asleep. In this analysis, the website does not consider that even if you are deaf in a dark cave, the circadian rhythm of your body clock would wake you.
Muslims were not the first to know that you can hear in your sleep. 2000 years ago the Romans had built water-powered alarm clocks which dropped balls onto a gong to make noise.
Image by אני, via Wikimedia Commons.