Praise be to Allah.
None of the things that break the fast – apart from menstruation and bleeding following childbirth – invalidate the fast unless three conditions are met:
(i)that the person knows that this breaks the fast and is not unaware of that
(ii)that he remembered that he was fasting and had not forgotten
(iii)that he does it voluntarily and is not coerced.
Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) said: If a fasting person does any of these things that break the fast without meaning to, then his fast remains valid. If he rinses his mouth and some water reaches his stomach without him meaning it to, then his fast is valid. Majmoo’ al-Fataawa 19.
And he (may Allah have mercy on him) said: If a gnat flies into the mouth of a fasting person or something enters his mouth without him wanting it to, or he rinses his mouth or nose and some water reaches his throat without him meaning it to, then his fast is still valid and he does not have to make it up. Majaalis Sharh Ramadaan, no. 15.
Based on the above, if the water enters the stomach by accident, then he does not have to do anything, because Allah says (interpretation of the meaning):
“And there is no sin on you concerning that in which you made a mistake, except in regard to what your hearts deliberately intend”
It should be noted that the fasting person is not allowed to go to extremes in rinsing the nose, so that water will not go down into his stomach by accident. The Prophet (peace and blessings of Allah be upon him) said: “Go to extremes in rinsing the nose except when you are fasting.”
And Allah knows best.
See Question no. 38023.