Not a good idea, for all the reasons mentioned above.
As a push-up, it’s not all that effective.
As cardio, it’s also not all that effective.
So, I guess if you’re tired and you need to rest, and you’re not concerned that the push-up won’t be that effective, and you’re not worried about the risk of falling off the bike, it’s fine. IMO, get off the bike sooner and include a weight training session afterwards if you really want to work your chest. Since the posture is already hunched over in spin anyway, if you’re going to get off the bike and weight train, work the middle back! 😀
Push ups on a spin bike? Doesn’t sound like a good idea.
a) The handlebars on a spin bike are not designed for a push up.
b) How are you working you core muscles if you body is hunched over the handlebars? Sure you can push against the handles but isn’t the push up designed to work the core stabilizers (and other muscles)?
Ride and stay safe!!