I've got an S1a which suffers from the same problem, mainly in cold weather at low shutter speeds. The (lousy) method I use is to fire off another frame at the fastest speed the camera will do (1/1000th in this case); the vibration usually knocks the mirror back down.

I asked Amateur Photographer about this problem and their expert said it was quite common with older Pentaxs and recommended a few places that could service it for me. I don't know of a DIY fix.