Praise be to Allah.
It is not obligatory to wash the mouth after eating or drinking, whether one wants to pray or read Qur’aan. But it is mustahabb for him to do that, especially if what he ate or drank was at all greasy, because of the report narrated by Muslim (358) from Ibn ‘Abbaas (may Allah be pleased with him) according to which the Prophet (blessings and peace of Allah be upon him) drank some milk, then he called for water and rinsed out his mouth and said: “It is somewhat greasy.”
Al-Nawawi (may Allah have mercy on him) said: This indicates that it is mustahabb to rinse out the mouth after drinking milk. The scholars said: This also applies to other kinds of food and drink; it is mustahabb to rinse the mouth lest any traces of it be left that might be swallowed whilst praying. End quote from Sharh Muslim by al-Nawawi.
It says in al-Mawsoo‘ah al-Fiqhiyyah (38/108): Rinsing the mouth is mustahabb after one finishes eating, because of the report narrated by Suwayd ibn al-Nu‘maan (may Allah be pleased with him) according to which he went out with the Prophet (blessings and peace of Allah be upon him) in the year of Khaybar. When they reached al-Sahba’ – which is the furthest part of Khaybar – he prayed ‘Asr then he called for food, but nothing was brought to him except saweeq (powdered roasted wheat or barley). He ordered that it be wetted with water because it was dry, and the Messenger of Allah (blessings and peace of Allah be upon him) ate and we ate, then he got up to pray Maghrib; he rinsed his mouth and we rinsed our mouths, then he prayed and he did not do wudoo’.
This hadeeth indicates that it is mustahabb to rinse your mouth after eating. The benefit of rinsing the mouth before starting to pray after eating saweeq, even though it is not greasy, is it may leave bits between the teeth or at the corners of the mouth, and trying to get rid of them may distract a person when he is praying. End quote.
And Allah knows best.