For me it does, when I stopped taking in my first trimester for a couple months I noticed a significant increase in my anxiety levels. To the point I had panic attacks going to the grocery store. Yes with the first trimester you have a surge of hormones that flood your body but I felt the difference once I started taking it again. The specific brand I use that is also pregnancy safe is from a brand on Amazon called Naturelo it’s the Magnesium Gylcinate Chelate Complex, it’s plant based. Best of luck with your anxiety :)
The only thing it helps me with is the deeper sleep since I take it in the evening.