It was a slow, frustrating process. I'd reckon that, for me, 80% of it is nutrition and exercise and the other 20% is sleep hygiene (and I would include some specific supplementation in the hygiene category). I believe that consistency with the major contributing factors is where I found long-term success. The minor factors are there to aid the major ones.

I used to wear sleep trackers to bed and I also had (have?) very poor deep sleep. I've left the sleep trackers out of the equation for a couple of years now, so I can't really comment on where I am today, other than to say that I wake up feeling refreshed. A little groggy, for sure, but I don't feel extreme fatigue like I used to.

I don't like making drive-by, blanket recommendations about this stuff when it starts to wade into medical advice / specific nutrition or supplementation, but... My last sleep study (way back in early 2016) pointed me in the direction of blood work. There was a thought that I may have thyroid dysfunction (I don't, or at least I didn't). I understand that it's fairly common and is a source for sleep troubles for many.

I'd also encourage you to look into ZMA or zinc supplementation if you're an active person. I don't have any specific sources that I can point you to, unfortunately. There's a little controversy here, too, to be aware of, because there is a lot of marketing hype around ZMA, about it being a "testosterone booster" (a zinc deficiency will lower your testosterone, hence supplementing it "boosts" your testosterone) and also in terms of the recommended dosages (zinc has an antagonistic relationship with copper, iron, and magnesium -- you can easily overdo it and create other mineral deficiencies). Having said that, and again just speaking for myself, I think that ZMA or zinc alone, after everything else was in place, is the thing that pushed my sleep quality over the edge from "meets goals" to "exceeds expectations".

I really, really want to make it abundantly clear that I don't think taking ZMA or zinc before bedtime will work for people that don't have these other major factors in place and/or don't have a (training-induced) deficiency to begin with.

In terms of my experimentation process... I didn't keep a notebook but I can sort of walk you down the path that I took.

I started with exercise but for years I was only doing cardio. I was a competitive distance runner from 12 to 18 and then maintained the habit until I was 25. Then I abruptly stopped running. I picked it back up at 32. Distance running specifically because I really knew nothing else. In my late 30s, I picked up strength training. Today, I maintain a clear balance between strength and conditioning. Endurance work is only used to develop or maintain specific physiological adaptations.

Also around that 32 mark, I realized that frequent alcohol consumption wasn't doing me any favors. Of course I already knew this but I wasn't serious about it before this point. Today, I try to strictly limit alcohol intake to Friday / Saturday evenings with limits of no more than 3 drinks per night and no alcohol after ~8:30-9pm. I'd wager that I average 2-4 drinks per week today and I find that this doesn't appreciably impact my sleep.

I also noticed a big difference when I started to tap the brakes on my caffeine intake. Dr. Walker's book on sleep, which also comes with it's own controversy, highlighted something very important to me: The quarter-life on caffeine is ~12 hours. That realization was enough to get me to take rate limiting caffeine seriously.

By the time we had our twins, I was 38. I had dialed in my nutrition and exercise to a healthy place at this point. But my sleep quality was still lacking. I knew that I needed to really focus on it if I was going to survive the first few years of multiple young children. That's when I started to look into hygiene factors.

I run hot. Higher body temperatures can disrupt sleep. I stopped eating after 8pm. We bought "cooling" sheets. I started to sleep with a lightweight comforter. I started wearing cotton boxers and socks to bed. We invested in a fairly expensive mattress. I started to actually feel comfortable in our bed. I also invested in a pillow that didn't leave me waking up with a tight, sore neck. The sheets, comforter, and pillow went through a trial and error process.

One of our twins is highly susceptible to sleep disruptions from light. Once we figured that out, we outfitted our bedroom (they were still sleeping in their cribs in our room at that time) with blackout curtains. That made an immediately noticeable difference. Waking up that following morning, my wife and I both looked at each other and wondered why we'd waited so long. Now every bedroom in our home has blackout shades or curtains.

It's an agonizingly slow process. And I think it's also very subjective, especially the nutrition and exercise pieces. I'm not sure if you're familiar with Dr. Andrew Huberman but he has his own podcast, as well as multiple podcast appearances, where he gets into improving sleep / sleep quality. I'd recommend checking those out. Should be easy enough to find on YouTube.