First of all, try and set a cut off time, mine is usually around 7:30pm.
Try your best to stay consistent. If you just can't go without, it's important to know what's safe to eat before bed. Since you're going to sleep soon, the last thing your body needs is energy, Carbohydrates=energy, No carbs before bed is a good rule of the thumb. You're better off with high protein and maybe some fat, maybe eggs, hard boiled eggs or egg whites, maybe a little peanut butter and I mean a little as it has 16g of fat per serving, maybe some jerky. #1 option is a protein shake. The reason protein and fat before bed is because it's the longest period of time your body goes without any food, fat slows down your digestive track allow the protein to digest slowly giving you a great full body recovery especially if you exercise regularly.