The Night Journey narration does not portray Allah as discovering a mistake or learning from Moses. It describes a decree whose full purpose Allah already knew: the obligation would be five prayers in practice, carrying the reward of fifty.
Why the objection seems powerful
The strongest version of the criticism is not merely that the number changed. It is that Moses appears to know something Allah did not: that Muhammad's community could not sustain fifty prayers. Muhammad (PBUH) then returns repeatedly, and the obligation is reduced through what sounds like negotiation. If Allah is perfectly omniscient and wise, why issue a command that later needs correction?
That reading is understandable if the story is treated as a human administrator revising a policy after receiving new information. But that is precisely what the Islamic account does not say.
What the narration actually says
Allah said, "They are five prayers every day and night. For every prayer there is a tenfold reward. Thus, they are fifty prayers."
Sahih al-Bukhari 349; Sahih Muslim 162
The final statement is decisive. Allah does not say that fifty was an error later corrected. He declares that five are, in reward, fifty. The command's final form and its reward were known within the divine decree from the beginning. The repeated returns of the Prophet (PBUH) are therefore not information-gathering by Allah; they are part of the event through which the ruling is revealed.
In ordinary human life, an intention can unfold through stages without the person learning anything new. A teacher may ask a student questions even while knowing the answer, because the exchange serves a purpose. Likewise, divine actions occur in time, while Allah's knowledge is not acquired over time. The fact that humans witness a sequence does not mean Allah is moving from ignorance to knowledge.
Moses' advice does not imply superior knowledge
Moses spoke from his experience with his people and from what he understood of human weakness. That is practical counsel, not knowledge independent of Allah or superior to His knowledge. Allah had already chosen to make Moses' advice part of the means by which the prayer obligation would be presented and its mercy displayed.
The Quran itself states a general principle:
Allah does not burden a soul beyond what it can bear.
Quran 2:286
Classical commentators such as al-Nawawi and Ibn Hajar understood the report as emphasizing Allah's generosity: the community receives the status and reward of fifty while being required to perform five. Calling this "bargaining" imports a human limitation into the narration. The Prophet (PBUH) is asking, but Allah is not being persuaded by a fact previously unknown to Him.
What this argument does and does not establish
The narration does establish a remarkable reduction in practical obligation and a divinely granted tenfold reward. It does not establish that Allah made a failed prediction, needed correction, or learned from Moses. Whether one accepts the narration also depends on one's assessment of the rigorously transmitted hadith, but once its premise is granted, omniscience is not contradicted. The apparent problem comes from confusing the order in which events are revealed to us with the order of Allah's knowledge.