I finished my Master's last year and I managed to lose a little weight in grad school despite the crazy program I was in!
First off, I was in an accelerated program so I finished my degree in one year, versus two or two and a half, and I worked full time one semester and then student taught full time one semester, worked part time AND took a full load of classes! Ahhh! I also made sure to go to the gym and NOT eat loads of junk food. I can't say I got plenty of sleep though...
Exercise was a priority in my life. It was like a class—I couldn't miss it for something frivolous. I was running from work to class to the gym and then home for a late dinner, but I managed to lose 8lbs and NOT gain any of it back by the time I started up again in May.
I bought lunch as little as possible (didn't have the money anyway) and I always had breakfast. I would prepare my lunch the night before or in the morning and take it with me. My family would often grill a lot of chicken one day (we still do) so that there was a lot of leftover for lunch throughout the week.
Just plan ahead! Make sure that exercise and eating right are as important as your degree. Don't skip exercise unless absolutely necessary. This means even planning your study time around it!