Insomnia😳

How do you deal with insomnia? I take melatonin supplements and I still have the occasional night were I'm wide awake and it's frustrating.