I dont think madara knew of any prophecy. I mean the whole frog sage thing was told to Jiraiya, so I doubt madara would have that Info. I just think he found an Uzumaki child in an area that was likely to have war and gave them to him. Remember in the flashbacks, nagato wasnt really an ubre poweful shinobi. But once yahiko was killed and he used the gedo mazo or whatever, he became alot stronger. Which makes me believe that awakening the rinnegan would make any average ninja exceptional, because having 6 zombie bodies that can fight as 1 doesnt take rocket science, but Nagato's uzumaki body made him more ideal for the strain that the rinnegan took on his body
-Madara gave his rinnegan to the most suitable candidate( body wise) in an area likely to be war torn in the future.
- Then he just said fuk it and hoped for the best. Which happened to happen. ex. The kids meeting jiraiya, getting trained, creating a group, yahiko gets killed by danzo and co. By this time Obito comes along as madara's stand in and approaches nagato