I used to have the same issue, and developed a rather odd sleeping pattern as a result. Basically, if i'm tired, I sleep. I used to waft away evenings being unproductive and feeling tired, for no real reason at all. I personally found that I was most productive at getting work done when I was at home in the evenings, rather than sitting in class. Or, even if i was tired in class, it wouldn't matter so much as i'd tend to have to go over the material again when I was revising/doing coursework at home.
So I got into an odd sleep pattern which changed a bit depending on the day, but generally went something like this:
Wake up at 7:30-8:00am, get home at 4pm. Nap until 8/9pm (sometimes later, like 11pm), wake up, have "dinner", and stay up until 4-5am doing work. I'd then sleep again, wake up for school and feel pretty exhausted during my classes, but i'd be feeling super fresh in those early morning hours. I can't really confirm whether this is healthy or not, but given the schedule of school and how my brain worked, it felt great for me to actually be able to get the work I needed to get done feeling fresh. As a result, I finished school with top grades.
This wont really work for everyone due to other commitments. It worked for me as during the last 2 years of my secondary school education because all I was focused on for that time was academics and knuckling down to make the most of my time. I absolutely hated packing things into short blocks of time and used to be far more efficient when I had large blocks of time to get things done. For me, a standard schedule was far too fragmented to be productive as the evening would be broken up, and then i'd be too tired after dinner to get into a rhythm.
Another method that can work is to wake up early and do your work before school, though I did try this and it was quite punishing, as I tended to lose motivation knowing i'd be leaving in a few hours. I also understand that a split sleeping pattern of doing either two 4 hour blocks, or say 5 hours and 3 hours wont work if you have dinner with your family (I used to cook most of my own food, or sometimes would just eat later). My mum didn't mind me napping when I got home as she understood that it benefitted my grades and work ethic quite significantly. A reasonable compromise is to try and eat dinner around 8pm, then nap from getting in until them. The schedule of the meal can force you to get out of bed, as its easy to over-nap without reaping the benefits.
Personally, the "power" naps never worked for me, it would make me feel a bit better, but i couldn't sustain energy.
A few years later during university, it got a little different as there was no obligation for me to go to class. So instead, I tended to just sleep when i wanted and work when I felt best to. As a result, I only slept once a day, but often, my days would roll together, or my sleep schedule would roll back as I tended to carry on working on something until either finished, or until I came to a reasonable stopping point. I rarely tended to stop because it was "bed time". Similarly now I work full time on games, but just work from my flat so I tend to have a rather odd 6-day week. I often sleep around 8-10 hours a night now, but each day, I go to bed later and later, pushing back bed time by about 3 hours. I do this because when I get in a rhythm, it is easier for me just to carry on working rather than breaking the flow. As far as life commitments go, if there is somewhere I need to be, i'll just wake up for it, and if i'm tired when i get back, i'll nap. If not, i'll carry on. I don't really care about when I sleep, or for how long, I just sleep whenever i'm feeling tired
(Also recently got given an award for highest academic performance in my department for last year, so can prove that it has enhanced my ability to consistently perform well)
The take away point is that now, I basically never feel tired to the point where I can't work. If I do, then I'll just start sleeping
I really like how it works out, as it makes me feel great, however a lot of people don't understand it... though they're the ones who are constantly complaining about being exhausted all the time.
Edit: Oh, another thing I thought i'd throw in is that i've also had the other problem where sometimes i'd be tired, go to bed but be unable to fall asleep, or i'd wake at a time which didn't really fit in. This was something else that motivated me to change my approach to sleep, so instead if i was just lying in bed wide awake, i'd just get up because it was unproductive for me to try and sleep if I wasn't tired.