Joyce Baldwin's commentary on Daniel says (pg. 129):
Verse 10 supplies welcome evidence concerning prayer habits during the later biblical period. Windows . . . open toward Jerusalem is a literal understanding of Solomon's petition [at the dedication of the temple], 'When [foreigners] hear about your great reputation and your ability to accomplish mighty deeds, they will come and direct their prayers toward this temple. Then listen from your heavenly dwelling place and answer all the prayers of the foreigners.' (1 Ki. 8:41-43; cf. 2 Ch. 6:34) [Baldwin quotes the KJV, but I added more context and changed it to the NET.] The fact that Jerusalem was in ruins called forth faith that it would again be restored because the God who had set His name on the city was the continuing, unchanging God, in control of history (Ps. 106:44-47; Lam. 3:31-33). Prayer towards Jerusalem is mentioned also in later Greek books: Tobit 3:11; 1 Esdras 4:58.
The Pulpit Commentary on the verse says, "The practice of prayer 'toward Jerusalem' is acknowledged to have arisen in Babylon during the Captivity."
John Gill's commentary says:
opened "towards Jerusalem"; not towards the king's palace, as if he prayed to him, and so eluded the decree; nor towards the east, as the Heathens did; but towards Jerusalem, which lay to the south of Babylon; and that, either because of his remembrance of that city, his affection to it, and concern for its re-edification; or having some respect to the words of Solomon, 1 Kings 8:33, &c.; and so, according to the Jewish writers, it was the custom of their people. Ben Gersom, on the above place, says, that though they did not pray within the temple, yet they prayed, turning themselves towards it, as much as possibly they could; and even when it was destroyed, as now, yet they in praying turned to the place where it had stood, as Saadiah, Aben Ezra, and Jarchi observe: and chiefly Daniel did this, because the temple was a type of Christ, through whom the persons and prayers of the saints are acceptable unto God.
The Talmud records conflicting opinions on whether Jews should pray toward Jerusalem, and at one point says they are to "mentally turn" toward Jerusalem.
Conclusion: Daniel wasn't the only one who prayed toward Jerusalem during the exile, and many Jews do so today. But it doesn't appear to have been a universal practice, just a common one. He appears to have done so not in compliance with his understanding of the law, but out of remembrance of the temple and defiance of those who competed for his allegiance to God.