why do dogs eat grass when they are sick?

Am really tired my pet has been eating grass for a long time now. He has refused to eat real food.

Please help me out  why do dogs eat grass when they are sick ?