Mixed valence rare-earth samarium compounds SmX (X=Se,Te) have been recently proposed as candidate materials for use in high-speed, low-power digital switches driven by stress induced changes of resistivity. At room temperature these materials exhibit a pressure driven insulator-to-metal transition with resistivity decreasing by up to seven orders of magnitude over a small pressure range. Thus, the application of only a few GPa's to the piezoresistor (SmX) allows the switching device to perform complex logic. Here we study from first principles the electronic properties of these compounds under uniaxial strain and discuss the implications for carrier transport. Based on changes in the band structure and a model we show that the piezoresistive response is mostly governed by the reduction of band gap with strain. Furthermore, the piezoresistive reponse becomes optimal when the Fermi level is pinned near the localized valence band. The piezoresistive effect under uniaxial strain, which must be taken into account in thin films and other systems with reduced dimensionality, is also studied. Under uniaxial strain we find that the piezoresistive response can be substantially larger than in the isotropic case. Analysis of the complex band structure of SmSe yields a tunneling length of the order of 1 nm. This suggest that the conduction mechanism governing the piezoresistive effect in bulk, i.e., thermal promotion of electrons, should still be dominant in few-nanometer-thick films.