Whenever you have anxiety, you body doesn't not respond properly which makes you to not eat anything. Anxiety is basically stress, which gives you some kind of fear, this stress changes the affect of your stomach which makes you lose your appetite.
If stress is the reason, you hunger would return after you feel relaxed.