I have been like this recently, and it is hard to get out of the pattern once you are in it. I know what it's like to watch the hours pass during the night and eventually fall asleep at 6 a.m, to wake when half the day has gone. After some long sleepless nights, the temptation to just stay up and read is sometimes overpowering, with the same result.
I tried staying awake all night and then going to bed at a sensible time, hoping that I would be tired enough to quickly fall asleep. It didn't work.
My daughter, who has had long bouts of insomnia since her teens, advised me to gradually go to bed earlier, maybe by half an hour at a time, to gradually reset your body's clock. If you have slept till noon, it's no use going to bed at 10 pm and expecting to sleep. Even midnight is too early. You have to slowly wind back the hours until you have gradually altered your sleeping pattern.
It does work. I wouldn't say that I am sleeping at a regular time and rising with the lark, but it's getting better. In the meantime, I wouldn't beat yourself up about it too much. You're not bothering anyone and I doubt that you are seriously damaging your health. It will pass. You will get out of it. Try not to worry too much.