toddler not sleeping

my almost two year isn't sleeping throughout the night like he used to he will sleep in his bed for like one to two hours in his bed then wake up and then sleep with us but we did an experiment and he slept in our bed for like almost 4 hours we figured that he needed a more comfrontable bed but hes still not sleeping all night long but a freind told me that it could be because of the fact i'm pregant and getting farther along in my pregancy anyone having some sort of problems and what solutions do u suggest