if you started a new exercise program, that can be to blame for weight gain. Are your muscles sore? I find I retain water with increased exercise the first week of a new program. As for late night eating, don't have bad foods in the house. I have a no eating after dinner rule. Sometimes I go to bed hungry. Its best for your body to fast in the night. You sleep better and your digestive system needs the break. I don't have any wonderful tips to break the habit. I can tell you I had to break the habit as a teenager when my body simply didn't allow me to eat anything and everything without the weight gain. So I just stopped. It was painful. I felt jipped for a long time. But it just became part of my lifestyle.