I am 12 weeks preganant and I have trouble sleeping last night I took 2 25 mg of unisom is it ok to take 50 mg?

Stick with 25 mg. The dosage in pregnancy is 25 mg. This medication is used for both insomnia and nausea in pregnancy. The dosage is considered 20-25 mg. I would not do 50 mg unless recommended by your doctor.