I definitely recommend reading Why we Sleep by Matthew Walker to better understand what's going on biologically with sleep and why it's so vitally important to make sure you are sleeping well (and not ruining your sleep with things like sleeping pills, alcohol or marijuana). The audiobook is quite good.
Here are a few suggestions in no particular order:
- Light is very important in setting your circadian rhythm and making sure you are able to sleep. Try to maximize your sunlight / blue light exposure in the morning and then try your best to avoid sunlight and screens for as long as you can manage before bed (minimum half an hour). If you go outside in the late afternoon for a walk (strongly recommended!), wear sunglasses. If you have to use screens in the evening, install software to reduce blue light.
- Caffeine has a 6 hour half life in your system. That means that if you drink 4 cups of coffee and try to go to bed twelve hours later, your caffeine levels are still like you just drank a whole cup of coffee right before bed.
- Alcohol and Marijuana may seem to help you fall asleep but they're both detrimental to sleep quality and quantity. Alcohol is one of the strongest inhibitors of REM sleep we know of, even in very small quantities. If you're having sleep trouble, drop alcohol. If you really must drink, try to drink earlier so that less of it is in your system when you try to sleep. Marijuana also suppresses REM sleep, though it doesn't seem to cause you to wake up as much in the middle of the night as alcohol does so it may not be as bad I'd still say you should stay far away from Marijuana if you're having sleep problems. REM is very very important to many mental faculties.
- Sleeping pills like Ambien do not put you to sleep. They make you unconscious but it is not sleep. It's more comparable to being knocked out with a baseball bat. Avoid sleep drugs like the plague unless you're talking to a doctor with special training regarding sleep. Most doctors have almost no training on sleep and don't understand or respect its importance.
- I find my exercise levels very important to my sleep quantity and quality and notice a definite decline when I stop exercising. Try to exercise every day, even if its just a long (half hour plus) walk outdoors. Try to vigorously exercise an absolute minimum of twice a week though if your regular exercise is rather relaxed.
- Take up mindfulness meditation. Meditating will teach you the tools you need to recognize when you're unproductively lost in thought and break out of it. This is vital for me being able to fall asleep as thinking about work or other random mental rabbit holes is a big barrier to me personally falling asleep. Mindfulness helps you develop the mental superpower of saying "Oh, I don't actually want to think about that. Let's drop this train of thought." Also, it will help you manage your stress levels throughout the day which is very important for sleep.
- Invest in earplugs. It can make a real difference. Though, I do worry that I'm becoming a bit dependant on mine.
- Develop a strict sleep schedule and stick to it. Even on the weekends. Bounding around what time you fall asleep will destroy your ability to sleep reliably.
Hope some of that is helpful to someone.