A numerical study of the natural convection flow in a porous cavity with wavy bottom and top walls having sinusoidal temperature distributions on vertical walls filled with a nanofluid is numerically investigated. The mathematical model has been formulated in dimensionless stream function and temperature taking into account the Darcy–Boussinesq approximation and the Buongiorno's nanofluid model. The boundary-value problem has been solved numerically on the basis of a second-order accurate finite difference method. Efforts have been focused on the effects of five types of influential factors such as the Rayleigh (Ra = 10–300) and Lewis (Le = 1–1000) numbers, the buoyancy-ratio parameter (Nr = 0.1–0.4), the Brownian motion parameter (Nb = 0.1–0.4), and the thermophoresis parameter (Nt = 0.1–0.4) on the fluid flow and heat transfer characteristics. It has been found that the average Nusselt and Sherwood numbers are increasing functions of the Rayleigh number, buoyancy- ratio parameter, and thermophoresis parameter, and decreasing functions of the Lewis number and Brownian motion parameter.