I feel your pain with the weight gain. I gained about 40-50lbs in the last 4-5 years. I have been on prednisone and other not helpful drugs so I blame myself for 50% of the problem. Exercise is not an option 90% of the time because of incontinence and pain in most of my joints / muscle. So without exercise you need to watch your diet.
I know nutrition plays a role, but after reading several studies and doing weeks of research I learned that most of us with UC / CD have absorption problems. A simple nutrition blast at least once a day came make a world of difference. I purchased a nutri-bullet. I try to make a healthy shake every day. It helped but the weight is slooooooow to come off.