The Legends novel Darth Plagueis proves that Sidious knew about the prophecy and the fact that the Jedi thought Anakin might be the Chosen One.
The following conversation occurred between then-Senator Palpatine and Dooku (still a member of the Jedi Order at the time):
Dooku fell silent for a moment, then said, “The Senate grapples with trying to solve disputes the Jedi often see firsthand. What laws are enacted only follow from our having brought our lightsabers to bear.”
“It was the Jedi who pledged to support the Republic.”
“The Order’s place in this is a matter Sifo-Dyas and I have discussed endlessly,” Dooku snapped. “But the members of the Council are not similarly inclined. They are entrenched in archaic thinking, and slow to embrace change.” He paused, and adopted a sinister look. “Don’t let yourself be fooled, Palpatine. They see dark times ahead. In fact, they think of little else. That’s why they have allowed the Jedi to become involved in parochial conflicts like those at Galidraan, Yinchorr, and Baltizaar, which are like brush fires born of windblown embers from a massive blaze just beyond the horizon. But instead of actually rising up against the corruption in the Republic, perhaps disbanding the Senate entirely for a period of time, they have become fixated on prophecy. They await the coming of a prophesized redeemer who will bring balance to the Force and restore order.”
“A redeemer?” Palpatine stared at him in authentic surprise. “You’ve never alluded to this prophecy.”
“Nor would I now if I still thought of myself as loyal to the Order.”
“I never considered that the Force needed to be balanced.”
Dooku’s lip curled. “The Order interprets the prophecy to mean that the dark tide needs to be stemmed.”
“You don’t accept it?”
Dooku had an answer ready. “Here is the truth of it: the Jedi could fulfill the prophecy on their own, if they were willing to unleash the full powers of the Force.”
“The full powers of the Force,” Palpatine said. “I’m afraid you’ve lost me.”
Dooku blew out his breath. “Perhaps it’s something we can discuss in the future.”
“You’ve made your decision, then?”
Dooku nodded. “If one more Jedi dies because of indolence on the part of the Republic and moral equivocation on the part of the Council, I will leave the Temple and refuse to look back.”
Palpatine was obviously playing dumb because Dooku was still technically a Jedi, albeit disillusioned -- Palpatine couldn't reveal he was a Sith Lord yet. Interestingly, the sentence
Palpatine stared at him in authentic surprise.
suggests that Palpatine was actually surprised about Dooku's mention of the prophecy, and not just playing dumb about it. If that's the case then Palpatine had not been aware of the prophecy before then (either because the Sith never knew about it before, the Sith had lost the knowledge by Palpatine's time, or Plagueis hadn't told Palpatine yet).
Later, a similar conversation between Dooku and Palpatine revealed to Palpatine that the Jedi thought Anakin might be the Chosen One:
Dooku chose his next words carefully. “Qui-Gon returned from Tatooine with a former slave boy. According to the boy’s mother, the boy had no father.”
“A clone?” Palpatine asked uncertainly.
“Not a clone,” Dooku said. “Perhaps conceived by the Force. As Qui-Gon believes.”
Palpatine’s head snapped back. “You don’t sit on the Council. How do you know this?”
“I have my ways.”
“Does this have something to do with the prophecy you spoke of?”
“Everything. Qui-Gon believes that the boy—Anakin is his name—stands at the center of a vergence in the Force, and believes further that his finding him was the will of the Force. Blood tests were apparently performed, and the boy’s concentration of midi-chlorians is unprecedented.”
“Do you believe that he is the prophesied one?”
“The Chosen One,” Dooku amended. “No. But Qui-Gon accepts it as fact, and the Council is willing to have him tested.”
“What is known about this Anakin?” “Very little, except for the fact that he was born into slavery nine years ago and was, until recently, along with his mother, the property of Gardulla the Hutt, then a Toydarian junk dealer.” Dooku smirked. “Also that he won the Boonta Eve Classic Podrace.”
Palpatine had stopped listening.
Nine years old … Conceived by the Force … Is it possible …
His thoughts rewound at frantic speed: to the landing platform on which he and Valorum had welcomed Amidala and her group. Actually not Amidala, but one of her look-alikes. But the sandy-haired boy, this Anakin, swathed in filthy clothing, had been there, along with a Gungan and the two Jedi. Anakin had spent the night in a tiny room in his apartment suite.
And I sensed nothing about him.
The novel ends with Palpatine's rise to the Supreme Chancellorship, so at the latest Palpatine knew about the prophecy and the possibility that Anakin was the Chosen One by the time of Episode I.
As far as canon sources go, we know that Anakin himself knew about the prophecy and that the Jedi thought he might be the Chosen One:
You were the Chosen One! It was said that you would, destroy the Sith, not join them. It was you who would bring balance to the Force, not leave it in Darkness.
Obi-Wan to Anakin during the duel on Mustafar, Star Wars: Episode III Revenge of the Sith
If he didn't already know, Sidious almost certainly learned of the prophecy from Anakin/Vader sometime after Order 66. However, I can't find a direct mention of the prophecy in a conversation between Sidious and Vader even in a canon source likely to have it (e.g. Lords of the Sith). Also, I can't find any canon source which proves that Sidious knew about the prophecy any earlier (e.g. while he was trying to recruit Anakin).