We don’t know where Martin was except on top. If they were fighting over the gun as Z said, and the gun was at his side in the holster when the first policeman arrived, I question if the gun got totally out of the holster.
On FOX just now they played one of the 911 calls.(from a woman) Voice could be heard calling for help and during it the gun went off.
strictly speculating. It could be that the gun was always in the holster. Martin decked zimmerman. (and as reported was pounding away on him with zimmerman) zimerman is calling for help and at that point martin realizes zimerman has a holstered gun. That is when the struggle for the gun ensues. Of course this is all speculation but for martin being on top hitting and zimerman calling for help.