Hey K.. First of all, congrats on the baby on the way.
Yes, if you were in a lot of pain, particularly pain where it upset you because you don't know why or understand it (so also scared combined with the pain), then it would not surprise me to hear that your GSD behaved abnormally. Dogs in general can be very sensitive to our moods and even physical things we are unaware of (haven't you heard of the cancer sniffing dogs?). It doesn't mean that there is anything wrong with your baby or pregnancy (although anytime you are concerned about something, talk to your doctor until you are satisfied and are informed - don't let yourself be brushed off if they throw medical jargon at you and you don't "get it".. keep asking for more explanation if you need it).
I, too, have a GSD (she is 5 now) and she seems more aware of things the more mature she becomes. She is sensitive to my moods, and everyone else's in the house too. She definitely feels a sense of "duty" to check things out, especially at night (outside) before she eats and retires for the night. Perhaps yours was trying to "stand guard" outside to try to protect you from the pain/fear you were experiencing. He may not have had any idea that it was internal stress and not coming from outside the house. He knew you were in distress, and took up a position to guard the "den".... That's what it sounds like to me anyway. I'd expect him to be very protective of you in the coming months... and especially after the baby is born. I LOVE GSD's, they are WONDERFUL!
If he continues to act that way, the best suggestion I can offer would be to try to take deep breaths and calm yourself (think Cesar Milan - calm and assertive energy)... When you are not exuding stress/fear/pain, he will be more likely to behave normally.
Good luck (with both the pregnancy, and figuring out the wonderful creature that shares your family)...