As I found out handgun shooting at long range is NOT easy, even when you are shooting from a rest with optics. Any variation in the release of hte trigger or recoil management will result in a flyer. Quite simply, it takes a lot of work and ammunition downrange to get under 3 inches at 50 yards. In my case more work and ammunition that I'm usually willing to spare. The only reason why I dit it that one time is because I was curious as to what my model 620 revolver was capable of doing and the 620 didn't disapoint me, it's fantastically accurate. Today I'm happy if I can shoot around 4 inches at 50 yards, it doesn't take nearly as much work or ammunition.
As for techinique, one critical aspect of shooting from a rest is that you cannot allow the barrel to touch anything. The only exception to this are the 617 or those models with 2 piece barrels. The problem is that if you rest the barrel on a sandbag it won't "ring true" with each shot and this will basically increase group size by a factor or 2 or more. Found that out by experimenting. As for why this can be done with the 617, it's because the barrel is so heavy in relation to the power of the caliber. However actuall experimentation with my 6 inch 617 has shown there is zero real benefit in resting the barrel because group size doesn't change. Since shooting with the barrel rested is steadier, I've conclude the barrel still rings but it's a low enough level to not be directly observable.
What I have found to work best for me is to plant the heels of my shooting and support hand on a good firm sandbag. My grip is the classic thumbs forward Brian Enos combat shooting grip. Yeah, I also shoot semi's. I've found that using this grip with a revolver works well and there is no risk for me that by support hand thumb will get into the B/C gap area. However, take note that I do NOT use the trigger guard for my support hand and I actually tested this grip with snap caps to cofirm it would be safe for me. One major benefit I've found from shooting off the top of a sandbag is that the recoil management techinique is basically the same as that used when shooting offhand. Because of this there is no really detectable change in the Point of Impact. This allows me to sight my guns in from a rest and have those sights be "true" for my offhand shooting.
Other tips. First, you'll want to cut down or lay off on caffiene. Try going caffiene free for 2 or 3 days and then having a can of Mountaain Dew during a break and you'll immediately see the effect of caffiene. Second, eat a proper meal about 2 to 3 hours before shooting. I've found that when my blood sugar drops too much I not only get hungry I also get the shakes.