In this article, the mechanism of the enhancement of neutron diffraction from KDP and TGS crystals under the action of an electrostatic field is proposed. KDP and TGS are both proton conducting crystals. In the presence of an applied static voltage, an electric field is set up within the crystal with a certain spatial distribution. Because of the piezoelectric effect, the spacing of the reflecting crystallographic planes depends upon the spatial coordinates, thus the restriction for the angular range of neutron diffraction should be relaxed, and enhancement of neutron diffraction results. Treating the spacings of the crystallographie planes as a function of spatial coordinates, we have derived expressions for the neutron diffraction intensity in both the laue case and the Bragg case, and estimated the order of magnitude of enhancement of the neutron diffraction resulted from inhomogeneous piezoelectric effects. Good agreement with experiment is found. New experiments for further verification of this mechanism are suggested. By the way, we remark that the above mentioned mechanism is not the dominant one responsible for neutron diffraction enhancement observed in a-LiIO3 under the action of an electrostatic field. A possible micro-mechanism for a-LiIO3 may be that under the action of an inhomogeneous field, the defects assume a spatial distribution which results in inhomogeneity of spacing between the crystallographic planes and hence enhancement of neutron diffraction.