Hi.
Thanks for your query and an elucidate history.
Since you have been having this pain for such along - say 3 years and used to occur at 3 to 5 am but now for the last 10 months it occurs in day too, upto three times a day, lasts for 10 to 45 minutes.
THis may be related to your body clock initially since it occurred in the early morning only.
IT looks this clock is disturbed and turned into
IBS as the most probable cause.
I would advise you to get the following:
Blood, urine and stool tests, review of the
thyroid functions, and B12 and to get corrected if yet abnormal.
CT scan of the abdomen and endoscopies.
IF all the investigations are normal this can then only be taken as IBS and get treated accordingly.