Its really hard to day without more information. You should talk to a doctor. Some other things that could be causing this that noone else has mentioned yet(I can't tell if this applies for you or not based on your post):
- not enough exercise
- vitamin d/c deficiencies (you can take supplements of vitamin d in winter time)
- bad gut microbiome. Try to eat a variety of vegtables as well as prebiotics (fibre, oats) and probiotics (yogurt, kefir,, sourdough ect).
- try to get regular sleep. I know this is your problem but there may be some things you can do like have a set bedtime, no screens for a while before bed.
Remember that many people have had similar problems and overcome them. You will just need to work out what works for you. Good luck.
Most is described here (the author probably has some amount of bias but this is the only summary I know of): https://github.com/KFearsoff/nix-drama-explained
Other than that some very active contributors resigned as maintainers in support of the open letters.
And it seems now that the community members in support of the open letters/changes have convinced the board of the foundation to agree on some things.