It is a natural product of your body so it is quite safe. Melatonin production drops off with age, and this is why supplementation may help you sleep as you get some years on you. It does for me. :-)
It is also an extremely powerful antioxidant, so beyond just helping you sleep, it probably helps you stay fit and healthy.
The toxicity level would be very high. It has not been established, but certainly is far, far beyond 3 mg. It’s been studied in doses up to 50 MG a night, and all that produced was vivid, unusual dreams in some of the test subjects. So I would have no concerns taking 1.5 to 3 mg. Find the dose that seems to work well for you, and take no more than that and you should be fine. For me, it’s 10 mg. See http://en.wikipedia.org/wiki/Melatonin