I have insomnia&have tried melatonin supplements and they didn't help. Any suggestions?

Other remedies. Your magnesium levels may be low in which case magnesium supplements or eating magnesium rich foods such as almonds, cashews or whole grains may help. Check out your room arrangement and see if has feng shui (favorable energy flow). Keep beds out of corners or next to windows. Natural remedies to try are chamomile tea & valerian. Pricey, but tempur pedic mattress & pillows are awesome.
Continued. So it is important to know what type of insomnia you have. I would search the internet for strategies to help improved sleep such as no caffeine, darkening the room prior to bedtime, etc. If you are able to go to a doctor or a sleep specialist, I would do so. Also, otc medication such as Benadryl (ingredient in tylenol (acetaminophen) pm) or unisom can work, but would only take for brief periods of time.
L-glutamine. Take glutamine start at 1gm at night and can take more as needed some people need upto 15gm. The reason for insomnia is either gall bladder issues or indigestion. If you are waking up between 12-2 am usually gall bladder if it is 11 hours after your dinner is indigestion. Need to reset those issues (caffine affects gallbladder).
CBT. Cognitive behavioral therapy (cbt) can be very effective for insomnia. If you search for a sleep specialist in your area you will find someone who can treat you.