Research indicates that magnesium can help with sleep. For people who suffer from insomnia or other sleeping disorders, a magnesium supplement may help.