I have heard that too but never really got down to testing it out. In fact I have resigned to the fact that when it comes to sleep to each their own.
For eg I have experienced better quality of sleep after taking ZMA ( I weight train ). But I have heard anecdotes where people have said that its just a placebo.
I take Magnesium every day, it has helped my sleep tremendously. I am more relaxed and less stressed during the day, too. It's like I am 10 years younger.