Here are my recommendations:
-Get to sleep at the same time every night and wake up at the same time regardless of what you're doing that day
-No caffeine after a certain time of the day (experiment and find out what works for you)
-1.5mg Melatonin. If it's not relaxing you, try a higher dose. If you have psychedelic, trippy dreams and wake up restless at 3am, you took too much. Take a lower dose.
-Exercise 3-7 times per week
-Figure out a way to not be sexually restless (you figure it out)
-No blue light from computer screens two hours or less before bed. I recommend the program
f.lux which changes the output light of your screen. Blue light inhibits melatonin release.
-If you can't stop thinking about what you need to do tomorrow while lying in bed, get a notepad or book to write down your "to do" list on it. Getting it on paper will allow you to relax better.
-No long naps during the day.
-Do something relaxing just before bed. I read.