I found this in the History of the Church, Vol. 5
“There is indisputable evidence that the revelation making known this
marriage law was given to the Prophet as early as 1831. In that year, and
thence intermittently up to 1833, the Prophet was engaged in a revision of
the English Bible text under the inspiration of God, Sidney Rigdon in the
main acting as his scribe. As he began his revision with the Old
Testament, he would be dealing with the age of the Patriarchs in 1831. He
was doubtless struck with the favor in which the Lord held the several
Bible Patriarchs of that period, notwithstanding they had a plurality of
wives. What more natural than that he should inquire of the Lord at that
time, when his mind must have been impressed with the fact–Why, O Lord,
didst Thou justify Thy servants, Abraham, Isaac and Jacob; as also Moses,
David, and Solomon, in the matter of their having many wives and
concubines (see opening paragraph of the Revelation)? In answer to that
inquiry came the revelation, though not then committed to writing.”
It sounds like when JS found polygamy in the Bible, he came to the conclusion that if they did it, he could too. Kind of a coincidence, don’t you think?