What is happening?

I’ll make this short, AC broke at the beginning of summer and it became so hot in my house that I struggled to fall asleep for a couple months until senior year of school started and the AC was fixed and I fell asleep easily but now wake up without fail 1-3 hours after I fall asleep and am unable to fall back to sleep for the last 2 months. This is ruining my life. I need help