I've used magnesium for years, which helped with some things but not sleep as such. I did some more reading recently and Magnesium Glycinate, also referred to as chelated form, has come out well in studies for sleep and anxiety.
The recommended dose I think was 225 at night, but you'd have to check that. Also be careful about the dose on the bottle, as it's rarely the dose of actual magnesium you?re getting, but should state somewhere on the label how many you'd have to take, also somewhere in the ingredients section online.