The Midrash wonders what benefit this brought the Israelites, and it answers that when the people saw Moses in a posture of prayer they realised that victory would only be possible with the help of God.
Does this mean that any time that people stretch out their hands to heaven there will be a miracle and everything will turn out all right?
There are two ways of responding to the question. One: if you know you are fighting for God you will make a superhuman effort of will, and that in itself is a Divine miracle. Two: prayer is a secret weapon that strengthens human hands.
When someone is ill, they need the best possible doctors, the most skilful possible nurses. But prayer – on the part of the patient and their family, as well as from the doctors and nurses – improves the quality of the treatment and care.
It brings into the case the highest Doctor of all. As the sidra says in the name of God, Ani HaShem rof’echa – “I the Lord am Your Healer” (Ex. 15:26).