A wormhole acts as a shortcut connecting two distant regions in the universe.
Allāh (ﷻ) gave this method of transportation to his angels throughout the universe. The Qurʾān calls them ❛maʿārij❜ (معارج) and describes how angels use them for long distance travel. Today, we Muslims know that these ❛maʿārij❜ is what scientists call wormholes.
Physicists know how a wormhole works, but have never actually used one. Do you remember how a frictionless roller coaster works? That is, you start high and slow then you go down and fast, but when you come back up again to your previous height, you return to your previous slow speed?
Well, the wormhole is the most efficient roller coaster you can imagine.
Energy is not required to move through the wormhole, that is, you can simply switch off your rockets. Gravity accelerates you and pulls you through and then expels you the other side. You will feel like being swept by waves at the beach; nothing more. On your way through, gravity causes your clock to run slower and your ruler to shrink. Distant observers see you accelerating to relativistic speeds; as a result, your energy (and mass) increase dramatically in their view; but when you get out the other side everything returns back to normal (your clock, ruler…).
❝Someone asked about the penalty that will befall the unbelievers; (A penalty) that has none to ward off; (a penalty) from Allāh (who owns) wormholes [❛maʿārij❜ in Arabic] The angels and the Spirit ascend to Him in a day, the measure of which is fifty thousand years.❞
― Al-Qurʾān, sūrah al-Maʿārij (Lofty Stations), Chapter 70, verse 1-4
Any object passing through this wormhole will also experience this same time dilation (one day inside wormhole vs. 50,000 years on Earth) and not just those angels. This time dilation does not say how long it takes you to cross the wormhole, it just says that when you pass through the wormhole you age by this ratio.
Muslims also believe that wormholes are not strictly for the use of angels. Prophet (ﷺ) used a wormhole once in the ‘Isrā & Mi’rāj’ (Mi’rāj معراج is singular of Maʿārij).
Allāh (ﷻ) says that those wormholes are doors in the heaven that contract interstellar distances into walking distances; the resulting scenery is bizarre: Allāh (ﷻ) says that those who do not believe in the message will not believe it, even if He showed them a bigger sign. He created beautiful towering structures in the heavens. If He opens for those non-believers a door in heaven and lets them continue passing through it to those distant structures, they would not believe that they really got there by simply walking few steps. Instead they would think that they are just optical illusions:
❝They do not believe the Message, like those who preceded them; Even if We [Allāh] opened upon them from the heaven a door and they continued passing through it they would say ‘Our sight is bedazzled, rather we have been bewitched’. It is We [Allāh] who have made towering structures in the heavens and made them beautiful for beholders. And We protected them from every evil spirit accursed.❞
― Al-Qurʾān, sūrah al-Ḥijr (Ḥijr),Chapter 15, verses 13-17
Here, they wouldn’t believe their own eyes thinking that what they see is not real. They wouldn’t believe that they got to those heavenly structures by simply walking few steps. But Allāh (ﷻ) insists that what they see is real and not illusions (that is, they really got there).