RossMAN, melatonin is a hormone that your brain secretes to make you sleepy. If you have funky work shifts, or just lowsy sleeping hours, a 5mg pill of melatonin will help make you groggy so you want to fall asleep, and then will help you sleep more soundly once you do.
I worked 3rd shifts every other day for 2 years and had some whack sleeping patterns. I used melatonin to get me used to sleeping during the day and eventually weened myself off of it.
From my experience, there are no side affects short of some dependency on it if you take it heavily and for a long time. I didn't wake up groggly like you normally do from Nyquil or other sleeping medications.
There is no harm in trying it. It's relatively cheap, around $10 for 2 months worth of pills, and there are no side effects. I just suggest that you do not use it every day and try not to use it for an extended amount of time. People are creatures of habit and if you use it every day, day in and day out, you will eventually find yourself unable to sleep without taking it.