Magnesium supplement

I’ve read that taking a magnesium supplement daily can help with sleep and fibromyalgia pain is this true ? And experience or stories taking this supplement?

Also can you build up a tolerance to it ?