I recommend you to read "Why We Sleep", however try not to be discouraged when you think about your sleeping pattern and what the science says it damages, and how it is devastating, detrimental to your health and so on. It can be overwhelming a little. If I had to choose one, this is the book I'd recommend.
I've only got my experience with sleep deprivation and the methods I use to fix it. I had severe sleep deprivation and now I sleep 8 hours on average, with quality sleep.
I am a very light sleeper, on top of having problems falling asleep. This is what I did:
1) limiting the noise - I installed new windows and added new door that leads to my bedroom; I have a fan that I put next to me, put it on the highest speed and it absorbs any noise left. You can achieve this with a "white noise app", too.
2) completely dark room - I cover the windows outside, and then inside too (just in case any light escapes).
3) I fit my meals within 8 or 9 window as a part of TRE (Time-Restricted Eating) - my first meal is around 9AM. It does not have to be perfectly accurate (8:45, 9:15 acceptable)
4) strength training every day (assuming you are cardiovascularly fit); I do sprints as well (twice a week or so)
5) zero alcohol - it is one of the strongest REM suppressors
6) zero caffeine - very important. The average half-life of caffeine is 6 hours. That means that after 6 hours, you still have 50% caffeine in your body.
7) write down the following, and try to look at them from time to time: when you eat, what you eat, calories/macros breakdown, when you go to bed, when you fall asleep (approximately), when you wake-up, and a summary of the previous afternoon and night time - what you think is the reason for the sleep (or lack of) on the day of
8) try to fit in with your circadian rhythm. On average: we are at our peak 10AM-3PM - try to fit strenuous activities in this period (including heavy strength training - since I am a remote developer, I can do this).
9) I walk around 8-10 km every day, part of it in the morning, part of it around 20:00
10) try to limit blue light at night - some ideas: dim lights, orange/red glasses filter, orange/red light bulbs.
-----
These were the major things that I did, and some combination of them seem to work. I don't know which ones precisely.
Some things that didn't work for me:
1) some natural remedies like valerian tea, etc. - it made me worse, actually.
2) meditation - just doesn't work (for me). A lot of people swear by it..
3) nothing of this sort: https://www.artofmanliness.com/articles/fall-asleep-fast/
Try to learn something from what you eat - but be brutally honest with yourself and write down everything that contains calories that you eat. I noticed that I sleep worse on the day I eat more sugars (and I hardly eat sugar at all!).
Hope this helps someone.. I know how hard it is without sleep.