As someone who has had adhd since I was little, interspliced with aspersers that can make pulling away from something distracting very difficult, I get where you're coming from. There was a time, for example, during my first year at college where I was completely unfocused and was playing catch up more than I was staying relatively ahead like I was in High School. But I think what's important out of all what I'm about to say is that improvement starts with you. If you have the drive to improve yourself, you'll be able to do it.
One way you can help yourself focus is by eliminating any potential distractions, weather that be your phone or your computer or anything. From my experience, not having any outlet for potential distraction or take your mind of it leads me to do my homework because there's nothing else to do. Also, getting your homework done earlier is way better than waiting to till the very last moment. Not only will not stress about getting the assignment done but you'll also have more time to use your phone, computer, watch tv, etc. Setting a personal goals helps; where you hold off on goofing off until you get whatever homework needs to be done. Like not playing a video game you're really until you get your task done. Also it helps jumping into your homework shortly after waking up since that will help you maintain attention (at least in my experience)
As for your sleeping habits, one huge way to get around it is by setting up a consistent sleeping schedule. Where you'll get yourself into a habit to where it begins to feel natural. Start by setting up a time to go to bed and to wake up, and try your best to adhere to them everyday. After a while it just become natural to you and going to bed and waking up early will be as easy as tying your shows.
Hope this helps! (started typing this out when I should've been reading my textbook XD)