Marijuana use during pregnancy ?

Ok so I have extreme anxiety and insomnia which has worsened since I found out I'm pregnant. I quit taking my normal anxiety medicine due to the risks. I used to smoke marijuana before bed and it helped me sleep but have quit since learning I'm pregnant. It is legal where I live. I do have a script. But nobody can really tell me if this is safe during pregnancy? I know smoking in general is frowned on.. but is weed any different? I haven't been smoking but today has been really bad and I have yet to get more than 3 hours of rest. I just need some relief! I don't know what to do anymore. Any of you ladies use marijuana during pregnancy? Does anyone know the risks associated with this? Opinions?