The nation of Israel was encamped on the shores of the Reed Sea. The Egyptian army was hard upon them. God says to Moshe, “מַה־תִּצְעַק אֵלָי דַּבֵּר אֶל בְּנֵי־יִשְׂרָאֵל וְיִסָּעוּ/Why are you crying out to me? Speak to the children of Israel and move forward.” (Shmos 14:15) This is a difficult pasuk to understand because there is no prior indication that Moshe Rabbeinu cried out to God. The Midrash addresses this question and says that God is not telling Moshe to stop crying out to Him. Rather God is telling Moshe not to cry out to Him. Why? This seems like the best time to ask God for help.
To answer this question the Midrash, according to the Chiddushei HaRim, teaches us a fundamental principle of prayer. The Midrash says that God bequeathed prayer (lit. sound) to Ya'akov, “הַקֹּל קוֹל יַעֲקֹב ... .../… the voice is the voice of Ya’akov …” (Breishis 27:22) What does this mean? Is prayer reserved for the descendents of Ya’akov? Cannot anyone pray? The Chiddushei HaRim explains that our prayer awakens the connection between us and our spiritual source. While anyone can and should turn to God for his needs, God specifically bequeathed to the descendents of Ya’akov the power to use prayer as a means for coming near to Him. In fact, coming close to God is the ultimate purpose of prayer. Once the connection is established and strengthened, the prayer has accomplished its purpose. Crying out to God has been used for its true purpose - to reach the higher level of faith manifested by silence.
This is the reason God told Moshe not to cry out to Him. On Moshe Rabbeinu’s level God already heard his prayer even though he had yet to mouth it as the Midrash ends, “… Why will you cry to Me? I have already heard your cry.” This concept is also apparent from the Midrash later that brings the pasuk, “וְהָיָה טֶרֶם יִקְרָאוּ וַאֲנִי אֶעֱנֶה .../It will be that even before they call out, I will answer …” (Yeshaya 65:24) to explain our pasuk. In certain instances, God answers prayers that have yet to be spoken.
We find this concept in another pasuk in Yeshaya (45:11) as well, “... הָאֹתִיּוֹת שְׁאָלוּנִי עַל־בָּנַי וְעַל־פֹּעַל יָדַי תְּצַוֻּנִי/… Ask me about the wonders (of the heavens). Do you command me regarding my children and the work of my hands?” God is telling us, through the prophet, that regarding His children, He has already created their salvation.
The Sfas Emes takes the concept a step further. He explains that reaching a level of preparedness to cry out to God is the main goal. Generally, this level is reached by actually praying, however, once it is reached the cries are no longer needed. Moshe Rabbeinu reached this aspect of crying out, hence God told Him that there was no need for the actual cries.
This concept is further embodied in a pasuk in Eicha (2:17), “צָעַק לִבָּם אֶל־ה' .../Their heart cried out to God …” and in a pasuk in Tehillim (34:18) cited by our Midrash, “צָעֲקוּ וַה' שָּמֵעַ .../They cried out and God hears …” The implication is that even if they cried out in the hearts – a cry that is not heard at all – still, God hears and there is no need to actually cry out.