I agree with trying Lowbrow's suggestion.
Another very-common possibility is a poor Shunt connection in your headphone jack. The purpose of that Shunt is to mechanically disconnect the speaker anytime you have headphones plugged in.
Next time the amp malfunctions, try cycling a spare guitar...