Corrugating channel wall is considered to be an efficient procedure for achieving improved heat transfer. Further enhancement can be obtained through the utilization of nanofluids and porous media with high thermal conductivity. This paper presents the effect of geometrical parameters for the determination of an appropriate configuration. Furthermore, the optimization of forced convective heat transfer and fluid/nanofluid flow through a sinusoidal wavy-channel inside a porous medium is performed through the optimization of entropy generation. The fluid flow in porous media is considered to be laminar and Darcy–Brinkman–Forchheimer model has been utilized. The obtained results were compared with the corresponding numerical data in order to ensure the accuracy and reliability of the numerical procedure. As a result, increasing the Darcy number leads to the increased portion of thermal entropy generation as well as the decreased portion of frictional entropy generation in all configurations. Moreover, configuration with wavelength of 10 mm, amplitude of 0.5 mm and phase shift of 60° was selected as an optimum geometry for further investigations on the addition of nanoparticles. Additionally, increasing trend of average Nusselt number and friction factor, besides the decreasing trend of performance evaluation criteria (PEC) index, were inferred by increasing the volume fraction of the nanofluid (Al2O3 and CuO).