It is recommended to consult with your healthcare provider before taking any over-the-counter sleep aids during pregnancy. They can guide the safety and potential risks associated with these medications.