There are times when a person eats when he is not hungry. There are many possible reasons behind this, which can include stress, emotions, habit, and such.
Thus, you should become more aware of whether your urge to eat is dictated by your stomach or something else.
If you are unsure, drink a glass of water instead, or if you really have to eat then get a healthy snack.