In this study, free lateral vibration behavior of a functionally graded nanobeam in an elastic matrix with rotationally restrained ends is studied based on the Eringens' nonlocal theory of elasticity formulated in differential form. Euler-Bernoulli beam theory, Fourier sine series and Stokes' transformation are used to investigate the vibrational behavior of nanobeams with restrained boundary conditions. Although vibration based dynamical analysis of nanostructures is a widely investigated topic, there are only few studies that exist in the literature pertaining to the analysis of nanobeams with rotationally restrained boundary conditions. To investigate and analyze the effect of deformable boundary conditions on the lateral vibration of nanobeams, the Fourier coefficients obtained by using Stokes' transformation. Explicit formulas are derived for the elastic nonlocal boundary conditions at the ends. A useful coefficient matrix is derived by using these equations. Moreover, the effects of some parameters such as functional gradient index, nonlocal parameter, and rotational restraints on the natural frequencies are studied and some conclusions are drawn.