Praise be to Allaah.
Wa ‘alaykum al-salaam wa rahmat-Allaahi wa barakaatuhu.
You have to try hard to give up this habit, and take your thumb out of
your mouth every time you realize that you are sucking your thumb. Whatever happens
because of forgetfulness will not affect your fast. The Prophet (peace and blessings
of Allaah be upon him) said: “Allaah has forgiven my ummah for what they do by
mistake or out of forgetfulness, and what they are forced to do.”
Reported by Ibn Maajah, 2033; Saheeh al-Jaami’, 1731).