Is it a good idea that a reviewer recommend a paper to be submitted to another journal after it is rejected?
It's definitely OK to name one or a few journals you would consider more appropriate for this paper. Some web interfaces for reviewers even have that as a built-in option.

One thing I encourage you to do is to use the journal's publication criteria to back up your opinion. These may have been given to you along with the paper, or they can be found on the journal's website. If, for example, the journal X's guidelines say:


  Articles should be of high scientific quality, originality, significance, and conceptual novelty that are of interest to the wide and diverse contemporary readership of X


then it's good practice, in your recommendation to the editor, to evaluate the manuscript following these criteria. For example, you could say:


  The manuscript is technically and methodologically sound, and clearly written. The conclusions are, in large part (minor exceptions noted below), supported by the results. However, it seems to me that this detailed study of knee injuries sustained in wingsuit accidents may not be of interest to many of the reader of The International Journal of Transportation Research.