The optical switching matrixes are notorious to fail on certain models. They don't usually do just *exactly* as you described, but hey, wild stuff happens sometimes. What model and year is your Mesa?I doubt if any of the tube socket contacts have lost their tension, but if they have they can cause random, intermittent crackling, especially when the amp is cranked up and subjected to a lot of vibration.
But, the most likely cause is the effects loop jacks, especially if you don't use them much and/or haven't used them in awhile. They are of a certain specific configuration that will jumper the preamp section straight into the power amp section when nothing is plugged into them. With time, their contacts can become tarnished and dirty, and this will cause the amp to intermittently crackle, fizzle, and cut out.
Most of these jacks can be cleaned satisfactorily by pushing a brass-bristle .30 caliber rifle bore brush in and out a few times. However, some types require that you clean them from inside the chassis. It's a simple job and requires nothing more than a piece of 1000 grit sandpaper. Before opening any amp up, always remember that charged filter caps can kill you, even with the amp unplugged. Discharge the filter capacitors by turning the amp off while you're strumming a full E chord at pretty serious volume. Continue strumming until the sound fades completely, 100% away.
Thermionic