He may have just gone off his pellets, one of mine has at the moment.
I would keep a close eye on him. You have done the right thing and taken him to the vet. As my vet says "you know them so well, you pick things up before we can". I have taken mine to the vet to be told there is nothing wrong and they have been fine, there have been other times when something develops further later on.
I hope he is okay and just feeling like a change of routine.