The lowest and most vulnerable part of the circadian cycle of most people is around 3 am.....lots of folk who pass away in hospitals do so around this time (just a known quantity because hospitals monitor TOD)
So everyone is prone to being a tad negative if they can't catch the sleep train at this point.
But if you add to that an issue preying on your psyche...maybe pressure to be up n about at worktime....then you've got worry keeping you awake, and the negativity cycle of thoughts kicks in.
Part of addressing this (a long personal process) is to identify the voice that is delivering your inner criticism. try to do this. You may find it is a parent, or a teacher, or a version of yourself. Attempt to identify their points of criticism..... and to to tell them where to stick it...because this is now yor life now, not their life then.
Another cool trick to a big night's sleep is total physical exhaustion. If you are placed to attempt it, try double-digging your garden in preparation for autumn planting.
Thinking of you on your healing journey and sending out blessings.