We adopted a 3 year old husky and he was sooo chill and calm. When I became pregnant and actually started showing he stopped pooping and peeing when we would let him out. He would just lay outside in front of the door. Well when my husband and I would go to bed he would poop and pee all over our floor not even 20 minutes later. This happened for over a month before we finally had to put him outside because the smell. We finally then gave him to a friend and he stopped right away and then she became pregnant.
Dogs can usually tell what is going on with their pregnant owners. So she is probably experiencing anxiety and stress because you are in pain and she knows baby is making it's way.
Dogs are very sensitive to their people being in pain the dog could be extremely nervous and stressed out because of the labour pains