More than likely the switch, but It can be the stop light switch on the brake pedal. Next time it happens, lift the brake pedal with your foot and try again.
1998 Pace Arrow 35 ft. F53 Ford V10 2014 Honda CRV toad
32 years mechanic at Delta Air Lines 15 year motorhome service manager. 3 popups....2 travel trailers....5 motorhomes....loved them all.