Context. Radial velocity monitoring of very cool dwarfs such as late M-and hot L-dwarfs has become a promising tool in the search for rocky planets as well as follow-up planetary candidates around dwarfs detected by transit surveys. These stars are faint at optical wavelengths, as their spectral flux distribution peaks at near-infrared (NIR) wavelengths. For this reason, it is desirable to measure the radial velocities in this wavelength regime. However, in the NIR very few medium-and high-resolution spectrographs are available at large telescopes. In the near future, high-resolution spectrographs for the NIR will be built, which will allow us to search for rocky planets around cool M-dwarfs and L-dwarfs from radial velocities monitoring. Aims. We investigate the precision that can be attained in radial velocity measurements of very cool dwarfs in the NIR. The goal is to determine in which atmospheric window of the Earth's atmosphere the highest radial velocity precision can be achieved to help in designing the next generation of NIR high-resolution spectrographs. Methods. We use stellar atmosphere synthetic models for an M-and an L-dwarf with temperatures of 2200 K and 1800 K, respectively, and a theoretical spectrum of the Earth's transmission in the spectral range from 0.9 to 2.5 μm. We simulate a series of Doppler-shifted spectra observed with different resolving powers and signal-to-noise ratios, and for different rotational broadenings of the dwarf. For different combinations of the input parameters, we recover the radial velocity by means of cross-correlation with a high signal-to-noise ratio template and determine the associate uncertainties. Results. The highest precision in radial velocity measurements for the cool M-dwarf is found in the Y band around 1.0 μm, while for the L-dwarf it is determined in the J band around 1.25 μm. We note that synthetic models may lack some faint absorption features or underestimate their abundances. In addition, some instrumental/calibration aspects that are not taken into account in our estimations would increase the uncertainties.