Also a vitamin D deficiency can cause insomnia so make sure to take a vitamin D supplement if you don’t get enough sun.
Yes, THIS ^
A variety of vitamin deficiencies can cause insomnia and that is definitely one of them. I myself have a rather sensitive constitution and I have found that I run into trouble if I take vitamins late in the afternoon--D somewhat and B12 BIG TIME, so if I miss the cutoff for taking them I have to skip it. So if you're taking vitamins--even cheapo multis--maybe pay some mind to when you take them. You never know.
Coffee is another problem. They are not all the same. The
Tonx homebrew I make wakes me up in the morning but as long as I drink in moderation doesn't mess up my sleep. If, however, I go grab the same amount at a coffeehouse it's a whole different caffeine level somehow and I'm usually screwed for the night even if I drank the last bit at 11am. Recently one of my favorite clients gave me a cup from her kitchen and wow, it blew up my sleep two nights in a row. (I should find out what brand she's got!).
I could go on about this topic at quite some length, as sleep has been a struggle for me for many, many years. You name it, I've tried it...
Something that appealed to my geeky/gadget nut side helped, however. I was the world's biggest fan of
Zeo before they shut down this year. Wore the sleep monitor for years to help me figure out with actual data what was giving me problems. Fitbit does sleep monitoring too and I found it to be accurate though not nearly as detailed. If you like the scientific approach, some kind of gadget to help you with tracking might prove useful (and fun).
And finally, yes--meditation. It's genuinely useful and it works.
"Meditation is the ultimate mobile device; you can use it anywhere, anytime, unobtrusively." ― Sharon Salzberg
"Mindfulness is simply being aware of what is happening right now without wishing it were different; enjoying the pleasant without holding on when it changes (which it will); being with the unpleasant without fearing it will always be this way (which it won't)." – James Baraz