I do that as well if I'm hungry in the evening. If it's real hunger and my body really needs food, it won't let me sleep that easily. If it does, then it means I was better off without the food. I know we shouldn't let our bodies get hungry for too long, but in that case, I think you very likely made the right choice.