Context : Most of the spectra of neutron star low mass X-ray binaries ( NS LMXBs ) , being them persistent or transient , are characterized by the presence of a strong thermal Comptonization bump , thought to originate in the transition layer ( TL ) between the accretion disk and the NS surface . The observable quantities which characterize this component dominating the emission below 30 keV , are the spectral index \alpha and the rollover energy , both related to the electron temperature and optical depth of the plasma . Aims : Starting from observational results on a sample of NS LMXBs in different spectral states , we formulate the problem of X-ray spectral formation in the TL of these sources . We predict a stability of the thermal Comptonization spectral index in different spectral states if the energy release in the TL is much higher than the intercepted flux coming from the accretion disk . Methods : We use an equation for the energy balance and the radiative transfer diffusion equation for a slab geometry in the TL , to derive a formula for the thermal Comptonization index \alpha . We show that in this approximation the TL electron temperature kT _ { e } and optical depth \tau _ { 0 } can be written as a function of the energy flux from the disk intercepted by the corona ( TL ) and that in the corona itself , Q _ { disk } / Q _ { cor } . As spectral index \alpha depends on kT _ { e } and \tau _ { 0 } , this in turn leads to a relation \alpha = f ( Q _ { disk } / Q _ { cor } ) , with \alpha \sim 1 when Q _ { disk } / Q _ { cor } \ll 1 . Results : We show that the observed spectral index \alpha for the sample of sources here considered lies in a belt around 1 \pm 0.2 a part for the case of GX 354–0 . Comparing our theoretical predictions with observations , we claim that this result , which is consistent with the condition Q _ { disk } / Q _ { cor } \ll 1 , can give us constraints on the accretion geometry of these systems , an issue that seems difficult to be solved using only the spectral analysis method . Conclusions :