There are lots of things that you could try changing, but it seems like you would be better off with more sleep. It seems like if you could fall asleep earlier, you might be able to avoid your binge. Lack of sleep can contribute to hunger (I know it does in my case, but I don't have any problem falling asleep; I have trouble staying asleep). But even setting that aside for the moment, it sounds like your lack of sleep is also affecting your work.
Is there any way you can work with your doctor to tweak your meds or the time you take it so you can fall asleep sooner? You might ask your doctor if you could take something like valerian before your meal if it wouldn't interact with your medicine. Aside from medical/herbal interventions, you might want to explore other methods to help you get to sleep earlier (meditation, self hypnosis, aromatherapy, whatever might work for you).
You may find that if you get more sleep, dealing with your other issues becomes easier. It sounds like this has been tough on you. I hope you find a way to get more rest!