Melatonin is considered to be likely safe when taken by adults in the short term. It is considered possibly safe when taken appropriately by adults in the long term. It can cause some mild side effects such as dizziness, stomach cramps, irritability, depression, and daytime sleepiness.
Also, you shouldn’t drive for five or six hours after taking melatonin.