Well, plan your snacks accordingly! I drink too much caffeine too sometimes. I just hold off until the planned snack comes around.
Now if it's a situation where you have to stay up late--work into the night--and that's unusual for you, then again, plan accordingly.
Also, try for a snack that won't leave your stomach growing even worse. Popcorn sometimes wears off after awhile... Something like part-skim ricotta cheese with some canned blueberries (in light syrup). 1/4 cup cheese, 1/2 cup blueberries. Comes out to 140 cals.