Assalaamu alaykum. I suffer from IBS (irritatory bowel syndrome) which means that I pass more wind than what is considered normal. My problem is that I struggle to hold wind and often pass it, and on bad days I pass wind as often as every half an hour. Sometimes, on bad days, I struggle to pray two units of prayer without passing wind. I know that there is a concession for people who pass wind continuously, but my problem is that my syndrome is inconsistent. On bad days, I struggle to remain in a state of ablution for even two units of prayer and have had the need to repeat ablution three times. I also pass wind while performing ablution and struggle to hold it. On good days, however, I can pray with one ablution without any problem. Furthermore, I do not know whether a given day is a bad day or not, i.e. if I have passed wind during the prayer, I do not yet know whether it is a bad day and I will do it again within the next half an hour or not. I only know if it is a bad day at the end of a prayer period. Do I also get a concession? And if so, then how does that work?
All perfect praise be to Allah, the Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad is His slave and Messenger.
If the passing of wind becomes less at times but it is difficult for you to adjust the time of its interruption because it is inconsistent, then this does not invalidate the ruling on the incontinence of wind according to some scholars of Fiqh (i.e. the ruling on incontinence still applies to you).
Hence, there is no harm on you in acting according to their view, because it is in conformity with the objectives of the Shariah in removing difficulty from people who are accountable for religious obligations in Islam; Allah says (what means): {…and He has not placed upon you in the religion any difficulty.} [Quran 22:78]
The Hanbali scholar Al-Mardaawi, when speaking about the woman who experiences bleeding outside her monthly menses and her bleeding is inconsistent, as sometimes it is delayed and sometimes it is advanced, and sometimes she has much bleeding and sometimes very little, in Al-Insaaf, said, "Al-Majd said in his commentary, 'The correct view in this case is as follows: There is no consideration for this interruption (of blood). It is enough that the blood is present at any given time.' He said, 'This is the apparent view of (Imaam) Ahmad in the narration of Ahmad ibn Al-Qaasim from him; the commentator chose this view. This is also the view chosen in Majma’ Al-Bahrayn. Ibn Tameem said, ‘It is the soundest opinion, Allah willing.’'"
As for how you can use this concession, you perform ablution for each prayer after its time becomes due and you start to pray, then any wind you pass after that is of no effect [i.e. you continue praying in this condition without having to perform ablution again, until the time for the next prayer starts].
Allah knows best.
You can search for fatwa through many choices