On our Allegro Bay, the slides won't operate when the ignition switch is on to prevent them from being deployed while going down the road. The interlock is achieved by means of a relay, which is located in the outside bay behind the passenger side wheel.
Having the slides work after turning the ignition switch off and on several times indicates to me you have a similar interlock and that the relay is hanging up and not always switching like it should. Ours did that on two occasions, and tapping on the relay with a screwdriver handle fixed it. However, if it is happening repeatedly, the best way to fix it permanently is to replace the relay - after checking for loose wires.