It sounds like your dog is acting lethargic or is experiencing discomfort/pain. It is a good thing that he is still eating and hopefully drinking. If this persists he needs to be examined by a veterinarian. If new signs develop or he becomes worse he needs to be examined by a veterinarian immediately. There are many things that can cause lethargy and discomfort.