I cut carbs/sugar and it really changed the way my body metabolizes salt and caffeine. It used to be that I'd get a headache in the middle of the night if I had a salty dinner, or had trouble sleeping if I had coffee, even if it were first thing in the morning. We've been low carb/sugar since October and I had forgotten about that problem, so a few months ago I was like, ohhhhh yeah...that used to be a thing. But, it just faded away.
If you try melatonin, maybe try the tums with 5mg melatonin and eat like 1/8th of it. And keep in mind that all it does is provide you a short window to help fall asleep, so don't take it thinking that you'll get even more tired if you just stay up a little longer, because you'll miss your window and it won't work as well. Go to bed the moment you feel it.
And of course exercise is always the best. There is no substitute for just flat out wearing your body out. Substances and whatnot is more of a backup. Weed is pretty good, but smoking flower dries out my sinuses. Edibles are nice, but if one were new, there's a learning curve to getting it dialed in. They have some 1mg gummies that are a great starting point so you don't wreck yourself.