It may be best if you made a doctor's appointment. It could be sugar issues like hppyfngy said or it could be thyroid issues. At any rate, it's never good to eat and then go to bed. If nothing's wrong, it will eventually catch up with you in weight gain.
I don't think I have ever woken up just to eat before. Now I would have no issues having a snack before bed but that is different. Is this your first pregnancy?
A lot of women find themselves hungry more than usual during pregnancy. In some cases, it seems the food gets processed faster than normal. It may have to do with what you're eating. Complex carbohydrates and proteins will stick with you longer than most things.