I struggle with this too. I know part of it is my childhood of having 'treats' after supper and watching TV. Just family eating habits that I learned very young.
The only thing that works is for me distract myself or if I must have carrots/raw veggies on hand. Calling someone help too they say late night snackers are lonely.