Insomnia is a serious worldwide health threat, affecting nearly one third of the general population. Melatonin has been reported to improve sleep efficiency and it was found that eating melatonin-rich foods could assist sleep. During the last decades, melatonin has been widely identified and qualified in various foods from fungi to animals and plants. Eggs and fish are higher melatonin-containing food groups in animal foods, whereas in plant foods, nuts are with the highest content of melatonin. Some kinds of mushrooms, cereals and germinated legumes or seeds are also good dietary sources of melatonin. It has been proved that the melatonin concentration in human serum could significantly increase after the consumption of melatonin containing food. Furthermore, studies show that melatonin exhibits many bioactivities, such as antioxidant activity, anti-inflammatory characteristics, boosting immunity, anticancer activity, cardiovascular protection, anti-diabetic, anti-obese, neuroprotective and anti-aging activity. This review summaries the dietary sources and bioactivities of melatonin, with special attention paid to the mechanisms of action.