I get up early to cycle as it’s often the only time I have. Motivation to get up and out in the cold, dark and rain is perhaps much tougher. But I do the following and somehow always get out!!
I lay my kit out ready in the spare room the night before - you could have yours ready.
I bring my bike in the night before - you could have your iPad or whatever setup and ready (could you pre-load the workout the night before and press pause, so all you need to do is press play?).
I have my coffee machine set up the night before, so I just need to turn it on for my double espresso! Pretty important pre any exercise so you get that caffeine buzz and kick to fire you through your session.
I have breakfast snacks ready the night before, so just need to eat... it’ll often be something super tasty which helps me to get out of bed to eat.
I have nice food ready for my return - you could set something yummy aside for after your session.
I have my drinks bottles filled the night before and ready on my bike - you could fill your water bottle the night before and leave it where you’ll exercise ready.
Basically I’ve found the better prepared I am, the easier it is to get on with it/ keep motivated. I find that lots of small things (eg bike not ready, kit not ready) can add up and act as enough of a barrier for me to lose motivation and not bother.
If all the above has failed (everything is ready and waiting) and I’m considering just staying in bed... I focus on how bloody good it feels to be out on the bike and how great I’ll feel after. It’s rare this doesn’t work for me!! You could focus on a bit of the class you love and how amazing you’ll feel after.