Are you sure that you can really eat whenever you want to? Then I am wondering why there are so many doctors who say that you definitely shouldn't eat after 6pm. It would be great it this statement wasn't true, but I don't know yet. Where did you get the information from? Or have you experienced that late night snacking doesn't have any effects on your weight?
Theres a few threads around here that deal with the same question. I've had no problem losing weight while snacking at night. As long as you haven't exceeded "your daily intake" there should be no problem.

clearly your body seems to want food at that time of night, just save a few calories extra for the evening and leave it at that. Im a night time eater from way back, though recently ive been purplexed by the fact that im suddenly hungry in the mornings more than evenings. And if i dont eat in the mornings fairly decently i eat continuously in the evening. but if i eat in the morning i dont eat so much in the evening.
But yeah, for the majority of the 160lb+ lost i ate most of my calories after 5pm (about 500 first half of the day, 1000-1500 the last couple hours).
Calories in vs calories out, dont stress or worry about it so much as just be aware thats when your body wants it more
It might change over time like mine has naturally, or it might not!
I'm no diet expert by any means, but I used to have a similar problem with snacking when I was hungry and drinking soda/juices when I wasn't thirsty. I've come to learn that this is a 100% mental thing. My methods for quitting should probably only be used as a last resort if you just can't seem to cut the habit.
What worked for me was that I consciously let myself overload on this junk until it just wasn't enjoyable anymore, to the point where I thought to myself, "This just isn't that great". It worked on quitting soda pretty easily, I let myself drink so much Mountain Dew that it just didn't taste good anymore and it quickly got the point where just the thought of it disgusted me. Especially when I found out that soda makes pretty good toilet bowl cleaner
As for snacking, this was sort of a two step thing. When I go running I tend to think to myself stuff like, "I just burnt off a Little Debbie snack cake worth of calories" after running a mile, or "I just burnt off a slice of pizza" after running 2 miles. Then you get home and you look at those snacks and junk food totally differently, you start asking yourself, "Which is easier: I can run another mile and have this cookie, or I can just not eat the cookie"... and the answer is so obvious that it's hard to still give in to the temptation.
Basically I look at all food as miles... some are worth it... some aren't.
my food plan calls for a snack of a fruit and a dairy, it seems to satisfy me.
anytime I eat anything sugary, I want more more more... i'm a darned sugar addict (ewwwwwwww did I admit that!?)