Yes, among other things, magnesium influences sleep quality . In order to get a good night's sleep, you need to be relaxed and comfortable. While magnesium can help with relaxation, a good mattress will provide you with comfortable sleep. Check out our best mattresses review to choose the best one for you.