The symptoms you have suggest a possible loose graphics card or memory (or both).
For a start, check all expansion cards and memory modules are correctly in place. Don't forget anti-static precautions when doing this.
While you are in there, try booting up with the case cover off, and check that all fans are working correctly. If you have a fan on the graphics card, don't forget to check that as well.