Toddler peeing his pants again

Mindy
My 3 & a half year old son has been potty trained for about a half a year now. About a month ago he started wetting the bed and peeing his pants. I took him to the doctor and had him tested for a bladder infection and diabetes. Everything checked out fine the doctor said maybe he's doing it because I'm pregnant has anyone heard of this?