Not only that, but consistent lack of sleep over time will trigger weight gain. Believe me, I know all about that, having spent about 2 decades in insomnia hell. I'll write later how I managed to pull myself out of it.
Insomnia is also a major factor in depression. So if you take medication to help you sleep, it can make your insomnia, and thus your depression, far worse.
Another huge factor that is especially detrimental for people concerned about their weight: aspartame. A friend of mine who was helping me fix some things in my apartment noticed a big box full of empty diet soda cans on my landing. He told me he had a naturopath doctor who told him how it can seriously impact sleep patterns. I listened and remembered how my sleep medications would stop working every summer when I was drinking more diet soda.
Took myself off of it completely. Guess what? Yep, my sleep DRAMATICALLY improved. It's a hard one to give up when you're doing your best to have a modicum of control over your weight, but if you have super bad insomnia, you need to go off of it. Immediately.
I have a whole lot of other health tips that are on an old blog I no longer keep up with (like, 7 years). Your writing here reminds me how much 40 years of coping with major mental health and health issues generally has taught me. I could write a book. But I have other books to write, too!
You're very definitely on the right track, doing what's good for you instead of listening to what people who make a lot of money off of telling people what to do.
Keep up the good fight!