The influence of ion adsorption on the behavior of the nematic liquid crystal layers is studied numerically. The homeotropic flexoelectric layer subjected to the dc electric field is considered. Selective adsorption of positive ions is assumed. The analysis is based on the free energy formalism for ion adsorption. The distributions of director orientation angle, electric potential, and ion concentrations are calculated by numerical resolving of suitable torques equations and Poisson equation. The threshold voltages for the deformations are also determined. It was shown that adsorption affects the distributions of both cations and anions. Sufficiently large number of adsorbed ions leads to spontaneous deformation arising without any threshold if the total number of ions creates sufficiently strong electric field with significant field gradients in the neighborhood of electrodes. The spontaneous deformations are favored by strong flexoelectricity, large thickness, large ion concentrations, weak anchoring, and large adsorption energy.