Imam Abu Bakr, may Allah have mercy on him, states that in the following narrations of the Noble Prophet (peace and blessings be upon him), there is evidence that using the miswak at the time of every prayer is a source of virtue and reward for the fasting person, just as it is a source of virtue for the non-fasting person. The Prophet (peace and blessings be upon him) said: "If I had not feared hardship for my ummah, I would have commanded them to use the miswak at the time of every prayer." In this noble statement, he did not exclude the fasting person from the non-fasting people (rather, he wished to give the same command for both).
Explanation & Benefits
Shaykh Muhammad Farooq Rafi
Benefits:
This command to use the tooth-stick (siwak) is general.
There is no restriction in it of being fasting or not fasting.
Therefore using the siwak with every prayer is a recommended (mustahabb) act, and no authentic hadith is established about not using the siwak while fasting near Zuhr, Asr or Maghrib. Therefore this excellent act should not be abandoned while fasting on the basis of personal guesses and imaginations.
Source: Sahih Ibn Khuzaymah: Commentary by Muhammad Farooq Rafee, Page: 2006