Look around the room and make sure you haven't done anything he would think of as scary. Such as moving or adding furiture, adding a new scary toy or perch to the cage, changing your hair, wearing red or black for the first time, changing nail polish.
If he just isn't eating or drinking period, then its probably an issue for the vet. If everything is the same as its always been and he's not eating or drinking just when your in the room, then I'd be inclined to think he's afraid of you.
Some birds will take some minor percieved scary thing and associate it with the person they love the most. It can be very heart breaking. If your sure its not physical and he's only like this when you or other people are around, then I would handle it by just not pushing him to do anything. You might think coming out is a good thing. If he's afraid, forcing him to come out will just teach him that your untrustworthy and that you'll likely make him do something aweful. Fear isn't always logical. I'd leave the cage door open and generally play hard to get. Stop by his cage a few times a day and talk to him or offer affection. If he's frightened, don't don't push or force it. Give him opportunities to come out or come to you, but don't force him. And if he does come to you, make sure he also can get away from you of his own free will, whenever he wants. With fear behavior, usually if they do come to you, its best to end the interaction before they become afraid again. So playing hard to get is good. Leave them wanting more, and they will slowly come out of their shell more and more seeking affection. Irrational fear behavior like that can take a long time to overcome. Just never be tempted to force, even if months down the road you still don't feel like you've made any progress.