Can they cause weight gain? Not really. At least not directly. What usually happens is that since the acid burning is gone, the person eats more calories than before. Every little bit adds up.
nexium and prilosec are both PPI's therefore they make less stomach acid causing slower digestion of food...causing slower metabolism...thus gaining weight i would reccommend maalox max or maybe TUMS but try full strength...if those dont work then stick to your meds... sorry i cant help more