I read that the Giant Galapagos tortoises would remain alive on their backs for nearly a year on ships sailing around the world during Darwins time! *** I WOULD NOT TEST THIS ***
It's very scary to come into the area that your tortoise is in and find him on his back. There are many conditions that would determine how long he could survive. #1 would be heat/sun. If you find him on his back often near his basking site... Move the heat source, or you'll likely cook the little fella. #2 size, the larger the tort, the longer it will take to overheat and dehydrate. Think of a rock.. A small rock will heat up on the surface at the same rate a large rock will, however it will take much longer to heat the entire "thickness" of the larger rock. Granted a tortoise has blood that will move the heat through him, but I think the same principle applies.
I hesitate to offer any advice, or number of hours because it all depends on the current conditions surrounding the tortoise.
You will be best off keeping him in an enclosure with rounded or 45 degree corners, and no sharp drop offs. Try to keep a solid ambient temp with a cool hide box instead of a really hot basking spot and a low ambient temp... Some will argue with this I'm sure, but it works well for me...This, I find will prevent "cooked tortoise" should he tip over under the basking lamp.
You might also try giving him a larger cage. He might just get bored, and climb the walls to escape. This will happen more often with aquariums or wire sides that the tortoise can see out of. They are curious animals! NEVER USE WIRE SIDES. Tortoises will climb and will fall and will injure themselves!
If he is outside try to figure out what he is flipping over on. Usually a corner of a fence or a step. Move it or change it to prevent the flipping.
He might also be displaying some early territorial behavior. I've read that Sulcatas have been know to be battering rams from the minute they hatch!! You may need to seperate him from the others if he is climbing on the other tortoises in turn causing himself to tip over.
Hope this helps, and by no means is anything I write here the way you should do it. I am sharing my experience with you and write this only to inspire you or help you solve the problem at hand.
I know that you asked "how long can a tortoise survive on his back", but you should also ask how he got there in the first place!!
-Kory