This reminds me of the web comic from Toothpaste for Dinner: “dopamine and serotonin, technically the only two things you enjoy.”
Maybe when your motivation for work dries up you have learned to replace the good feeling chemicals by binging a new reward: food. Especially true if you have been neglecting (starving) your body, not exercising.
I think you could easily find this habit devastating to your long term health. When you have this urge maybe it’s long time you took a break. Good luck!