Melatonin is produced naturally by the body to shut us down--it usually is cued by light and temperature. The melatonin used as a sleep aid is usually made synthetically. Melatonin supplementation results in less time to fall asleep, higher quality sleep, and more total sleep.
Valerian is a flowering grassland plant. It seems to increase a chemical in the brain called gamma aminobutyric acid (GABA), which has a calming effect throughout the body.
Magnesium is a mineral found in low levels in many foods--especially dark leafy greens. Magnesium is a component of 325 different enzymes in the human body. It is crucial to regulating energy levels--adrenaline and muscle tension for example. Magnesium is not a sleep aid per say, but it is a precondition. Try it, and if it works, do a better job of getting all your vitamins and minerals.
Almost everyone walks around in an altered state of alertness due to caffeine. People metabolize it at different rates, and some of us may be a little too dependent on it. Rutaecarpine originates in the Evodia fruit, found in China and Korea. It interacts with enzymes in the body to metabolize caffeine and reduce the amount of it we have in our bodies by the time we hit our mattress. This is almost like a do-over button. "Oops, I had too much caffeine today, and I still want to sleep." In two different studies, rutaecarpine was found to significantly reduce caffeine levels.
There is no single "cure" for inadequate sleep. It involves an entire lifestyle. All of the supplements above may be good in the short term, but in the long-run you need a balanced, healthy life, and a good sleep routine. This could all be for naught if your mattress is keeping you awake, be it uncomfortable or outdated.