We consider the twisted waveguide $\Omega\_\theta$, i.e. the domain obtained by the rotation of the bounded cross section $\omega \subset {\mathbb R}^{2}$ of the straight tube $\Omega : = \omega \times {\mathbb R}$ at angle $\theta$ which depends on the variable along the axis of $\Omega$. We study the spectral properties of the Dirichlet Laplacian in $\Omega\_\theta$, unitarily equivalent under the diffeomorphism $\Omega\_\theta \to \Omega$ to the operator $H\_{\theta'}$, self-adjoint in ${\rm L}^2(\Omega)$. We assume that $\theta' = \beta - \epsilon$ where $\beta$ is a $2\pi$-periodic function, and $\epsilon$ decays at infinity. Then in the spectrum $\sigma(H\_\beta)$ of the unperturbed operator $H\_\beta$ there is a semi-bounded gap $(-\infty, {\mathcal E}0^+)$, and, possibly, a number of bounded open gaps $({\mathcal E}j^-, {\mathcal E}j^+)$. Since $\epsilon$ decays at infinity, the essential spectra of $H\beta$ and $H{\beta - \epsilon}$ coincide. We investigate the asymptotic behaviour of the discrete spectrum of $H{\beta - \epsilon}$ near an arbitrary fixed spectral edge ${\mathcal E}j^\pm$. We establish necessary and quite close sufficient conditions which guarantee the finiteness of $\sigma{\rm disc}(H\_{\beta-\epsilon})$ in a neighbourhood of ${\mathcal E}j^\pm$. In the case where the necessary conditions are violated, we obtain the main asymptotic term of the corresponding eigenvalue counting function. The effective Hamiltonian which governs the the asymptotics of $\sigma{\rm disc}(H\_{\beta-\epsilon})$ near ${\mathcal E}\_j^\pm$ could be represented as a finite orthogonal sum of operators of the form $$ \-\mu\frac{d^2}{dx^2} - \eta \epsilon, $$ self-adjoint in ${\rm L}^2({\mathbb R})$; here, $\mu > 0$ is a constant related to the so-called effective mass, while $\eta$ is $2\pi$-periodic function depending on $\beta$ and $\omega$.