Melatonin supplements can be purchased without a prescription from a pharmacy or online drugstore. However, using these products during pregnancy is not advisable. Pregnant women should only take melatonin supplements on prescription.