You should have your dog checked by the vet. If there is nothing medically wrong with him then it may just be him having a bad dream. Dogs can have bad dreams when they have bottled-up mental and physical energy and frustration. Since dogs cannot speak to us and say, "I feel anxious inside" we humans often do not realize the way our dogs are feeling. Some questions to ask yourself:
Does your dog get a daily pack walk to satisfy the migration instinct that all dogs have? The proper way to walk a dog.
Does your dog feel he must take care of YOU rather than relaxing and letting YOU take care of him?