When people ask me for help in managing their nighttime cabinet-raiding, one of the things I ask about it is what they eat during the day. Often you're not eating enough. And then 8 or 9pm hits and you're starving, so you grab a pint of ice cream or a bag of chips (depending on the craving preference!)
Here's something to try during the day: eating enough real food.
You're a living, breathing, human being, so you need to fill up on lots of whole foods; not processed "food" 24-7, which is usually filled with sugar & preservatives. Yes, we all eat it, maybe every day. But if you're trying to avoid late night eating, you don't want the faux-food to be the biggest portion of your plate.
On the other hand, eating like a rabbit also isn't great for most people. I don't eat meat, fish, eggs, or much dairy, but I'm still not living off lettuce! You need to give your body a bit of oomph to sustain it. If you're trying to cut down your meat-eating, make sure you're adding in nuts, seeds & legumes.
Protein and "healthy" fats help keep you satiated and help you feel grounded.
I don't advocate for eating only protein and fat though — there needs to be a balance; you definitely need your veggies! (And that would get boring, quickly!)
Ideally you're looking for that happy balance in every meal & snack. Of course I'm realistic, so I suggest that at least most of your meals have this combo if you're trying to avoid late night gorging. Eat plenty of nutrient-filled food during the day, so you're not at that high level of hunger by the time you're on the couch for the night.