My response to melatonin varies. I find that it works better if taken with or especially shortly after vitamins B-6 and B-12. I always take it sublingually by crunching a tablet and holding it in my mouth with saliva for a good 10-15 minutes.
If I take it before bed, I find it works best for dreaming if I take it an hour before or thereabouts, rather than directly before. It tends to produce a slight increase in physical and mental comfort in me while awake, but it's not more than just noticeable. I usually take 3mg. Sometimes it helps my dreams to be more colorful and vivid and recallable, and sometimes it doesn't. Sometimes I'll wake up feeling really good and refreshed, and sometimes I can barely drag myself out of bed the next morning. I think that has something to do with when I'm sleeping and how long, even though I try to use it at the same time whenever I do use it to prevent that.
When taken with or especially in the day or two after AMT, I (and some others in PD) have found it to vastly increase dream clarity and recall and vividness. Curiously, it also seems to produce a sort of powerful, symbolic, doomsday/end-of-the-world type of dream in myself and those others, that tend to be terrifying but so amazingly vivid and realistic that ultimately I consider it a positive experience. The most vivid one I had involved me waking up from my sleep, in my bed, exactly like I was actually waking up, but seeming to be in a different reality or something, where many things about my life were not even close to the same. My face was rotting away and my fiance and cats and job and everything I love were gone, just didn't exist. My parents thought I was crazy and were trying to take me to an institution or something. It was so vivid that I could not tell it apart from waking reality. I went through a whole process of panic, realization that it must be a dream, inability to get out of the dream or change it in any way, and finally, a horrible acceptance of my new fate in a lonely, fucked-up alternate reality.
As you can probably imagine, I was REALLY glad to wake up! But it was far and away the most intense dream I've ever had, totally indistinguishable from waking reality in vividness and lucidity.
I guess this thread isn't about that specifically, but I wanted to comment. As far as anxiety, I have never gotten it from melatonin.