A good source of melatonin is serotonin, for example 5HTP supplements along with B vitamins and magnesium which are needed for serotonin synthesis. 5 HTP not only will provide for the melatonin, but also will take care of many low serotonin symptoms. For example feelings of depression, shame and guilt, obsessive or controlling feelings, angry feelings, fear or anxiety have been associated with low serotonin levels. Also gut (like IBS) and heart problems, sleep problems, fibromyalgia and other pains, cravings for carbs, alchohol and drugs have been associated with low serotonin.
Before going to bed, one can start with 50mg of 5HTP and increase the dose progressively until one has a good night sleep (up to 300mg of 5HTP before going to bed) and if that doesn't work, then one can add melatonin. Sometimes it happens that it produces the opposite effect, for example me, I stay up if I take the5 HTP at night. This happens when one has a sluggish liver, or when there are thyroid problems. So I take the 5THP with meals instead, 100mg with each meal (300mg per day) and after a couple of weeks, I'm sleeping better. For more details, see "Beating and Treating Fibromyalgia and Chronic Fatigue Syndrome" by Rodger Murphree, it is available as an e-book as well.