Jonah spent three days and three nights in the belly of a huge fish. From inside the beast he prayed. "I called to the LORD, out of my distress, and he answered me; out of the belly of Sheol I cried." Jonah 2.2
In a dark, lonely place, Jonah was able to pray. God heard and rescued him causing the fish to vomit him on land. God still had purposes for Jonah. He was not going to allow an extreme situation like this finish him off. Jonah held to his faith even though it seemed like hell there. He felt cut-off from God. But he remembered to pray.
God is everywhere. Underwater, if you are in a submarine, or scuba-diving. Or at 30 000 feet in an aircraft, or in space. Wherever you are, you can pray,He hears and answers.
No matter how hard your situation is, God will get you out. No matter how long your test is, God has a specific time for it, then it will end. No matter how isolated you feel or are, God will bring you out. He is your support. No matter how lacking in faith or God's light or love your place is, God can bring you out from there.
So whatever your situation is, keep praying and God will definitely answer. Endure in prayer, and wait on God.