Inconsistent Sleep Schedule

My sleep schedule this past week has been awful. Some mornings I wake up early in the morning before my alarm goes off and then other mornings, I sleep until noon. I try to go to bed at the same time every night and I’ve been trying to wean myself to a lower dose of my melatonin supplements (trying to go from 7.5mg to 5mg). I’ve also been trying to get into a better bedtime routine, but between working full time and going to night school, it’s been a little tricky. What can I do? I HATE sleeping in so late because I feel like I’ve wasted an entire day where I could have done so much.