Did this idea originate from historical Christian doctrine?
I suggest the answer may be "no". (I'm not citing any specific authoritative documents to prove this theory.)
Where did this idea come from that baby Jesus didn't cry?
When I was first exposed to this song, I recall thinking this:
People don't appreciate babies crying. People know that babies cry, but people appreciate babies being quiet. When a baby is sleeping, or otherwise just being quiet, people will sometimes refer to the baby as "being good".
Jesus was perfect.
That means Jesus was good.
I doubt that the song implied that Jesus never cried. I think the song was just portraying a nice situation, including a moment of time when Jesus was being good (by not crying).
The original author is unknown but it was held almost as German tradition and accepted by them to believe it was written by Martin Luther. The song appeared in a publication called The Myrtle in which it was attributed to Luther and they told of German mothers singing the carol to their children.
However the accreditation to Luther is denied because of the following.
Firstly it doesn't appear in any of his writings at a time when things were written down so much and passed on.
Secondly the time scale of which the first two verses of the song appeared in The Myrtle and gave their accreditation to him they already had the dates wrong.
It is believed that the songs error of those words is attributed to the heresy of Docetism. (See Wikipaedia article Away In A Manger). Docetism believes that Christ wasn't fully human, but rather a spiritual being. But Docetism has been rejected as a fable since the idea of Christ not being fully human first appeared in the false writings of a book called 'The Gospel of Peter'.
However the Bible says it differently about Christs humanity ...
Hebrews Ch4v15: For we do not have a high priest who is unable to sympathize with our weaknesses, but one who in every respect has been tempted as we are, yet without sin. 16 Let us then with confidence draw near to the throne of grace, that we may receive mercy and find grace to help in time of need.