I am a Mormon. As part of our religious observance, we fast for 2 meals on the first Sunday of every month. Also, I have fasted for the entire duration of the Muslim month of Ramadan twice now.
For Mormons, food and drink is abstained starting Saturday night after dinner until Sunday night's dinner. By the time dinner rolls around Sunday night, I am pretty weak. However, I have noticed that when I fast that Sunday, the following week, my system seems to clean itself out. I feel more alert, and energy seems to peak for a prolonged duration that first week.
While participating in Ramadan, food and drink is abstained from dawn to sunset for each day during the month. This usually means packing in the necessary proteins and carbohydrates for slow breakdown in the morning, and a filler at night. Both times, I shed about 10-15 pounds.
Ramadan was much more difficult for me to participate in, because I need to remain alert and active while at work. I can maintain that needed level until early in the afternoon, when I start to slow down. By the time my shift is over, I'm really not very productive. However, right about the time I am getting off of my shift, I notice that my hunger pains disappear, even though I'm still weak.
While I can't say I notice the increased energy or alertness at the end of the Ramadan, shedding the weight was a positive bonus, although it was not intended.
In both cases, Mormon fasting and participating in Ramadan, I can say that I have noticed personal health benefits, whether it is increased energy, or losing weight. Others I have talked to have noticed the same thing, both Mormons and Muslims alike.
So, it doesn't surprise me that there will be immune system benefits as well.