The ideal solution to a bad situation is to be aware and get out of the area. The next best is to be aware and face the situation on both feet, with your gun in your hand. But even the best laid plans can fall to the wayside during a life and death struggle.
You might be caught unaware and end up on the floor, defeding your life. In this situation, you must be able to draw your handgun from a compromising position, and to do this effectively under stress, you must practice--dry practice, of course.
If you’re lying on your back, and you carry strong side, you will not be able to reach your gun unless you roll to your weak side, allowing your elbow to curl back so your hand can secure a shooting grip. A pocket holster has the same deficiencies, and requires the same move. An ankle holster provides an easier reach from your back, and even raises your foot to defend against the attacker, but can be tricky to access if lying on your stomach. A shoulder holster also works OK if you’re on your back, but be nearly unreachable if your are face down.
Regardless of how you carry, knowing how to draw from any position can save your life. So, unload your gun and try drawing from the many positions on the ground that you could be forced into, and you’ll be ready if you just happen to hit the ground.