Great. Thanks for the additional information. I really appreciate it.
At first, I suspect something may have frightened him when he went out, and then when you comforted him, it triggered a positive association which makes him keep doing it.
It's the same thing as when you're training a dog for any other thing....he does the behavior (the acting scared), he gets positive reinforcement for the behavior (the comforting him), so the little light bulb turns on in his head to keep doing that behavior to get the reinforcement.
The best thing to do at this point is to not reward him with that reinforcement when he comes in acting scared or nervous. I know it's hard because you feel bad for him, but by stepping over him and ignoring the behavior, and only rewarding him when he's not acting like that, he'll relearn that the acting scared doesn't get him the attention.
If he were doing this at other times, or if he was having other symptoms such as weight loss, vomiting, diarrhea or anything else, then I'd think it was something medical possibly, but since it only happens at this specific time, I think it's just a learned behavior that we can help him unlearn with time.
I hope this helps.