Was it ever common? Was it something that happened with regularity at some point and then ceased as time went on (as the Church or gov't grew in power or something like that)?
You're on the right track, marriage became only a really important institution from c.900-c.1000 onwards (I'm chiefly discussing the 'Christian West' - the regions which would become France, England, Germany, and Spain). Before then most European societies, at the elite level, practiced polygyny (ie. successive women) but were quite receptive to the Church's preaching on incest making noticable efforts to remain outside of the quite strict 'forbidden degrees' of consanguinity. In the late ninth- and tenth-centuries the Church was making significant efforts to move these societies away from polygyny and into monogamous relationships. The policy was not overwhelmingly successful but some of the tactics including a greater emphasis on the sin and thus the legitimacy of the heir who was conceived in wedlock as opposed to outside of wedlock. Thus it was notable when someone was a bastard but not an inherent inhibitor to inheritance. Lay persons could move from woman to woman with relative ease and little reference to the Church.
The crux period came in the eleventh- and twelfth-centuries when the laity, especially the nobility and monarchs, realised they could effectively exploit the stringency of the forbidden degrees to maintain practicing polygyny but remain inside the Church's teachings. If a marriage could be proven to be within the degrees then it was grounds for dissolution (not annulment because it had likely been consumated).
There were a few factors which affected this. For one, the degrees were rather ridiculous. To know for sure that your potential spouse was not within your forbidden degrees you had to be able to trace both lineages back to your great-great-great-great-great-grandfather. Of course, the records did not always exist to allow this to occur (which could enabe the more cynical persons to forge a distant connection in the form of a fabricated genealogy). The intermarriage of the European nobility had also greatly restricted the potential, or practical, pairings available. If the two parties could demonstrate that there was no potential spouse with the requisite rank or power who was outside of the degrees of consanguinity then they would often apply for a papal dispensation to let the marriage go ahead. The papacy would not always grant these, and would not always condemn obviously incestuous marriages such as that of Louis VII and Eleanor of Aquitaine in the mid twelfth-century, but had been willing to forbid marriages between consenting individuals (there is a famous case from Iberia which is on the tip-of-my-tongue, I will add it later). For the most part these controversies arose because individuals would marry and then seek papal dispensations rather than wait for affirmation and dispensations to arrive (this would put pressure on the Pope to grant the dispensation as the marriage had likely already been consumated). The height of cynical marriage was recorded by Pierre the Chanter in the twelfth-century when he related how a knight said he would marry within the third degree and if his wife displeased him he would have the marriage dissolved. The nobility had established a 'get-out-of-marriage-free card' and were abusing it quite openly.
Ultimately this played out in the Church's favour. The lay elite had submitted to the Church's authority over marriage, even if they resisted the Church's idealization of marital love as the only 'true' love, for the purposes of exploiting the loophole in consangunity (this is a bit broad-brush but it is essentially true). In the thirteenth-century at the Fourth Lateran Council (1215) the loophole was codified and somewhat closed. The number of forbidden degrees, which had been somewhat confused according to which counting method was used, were reduced to only your great-grandfather.
The corollary of this was that another Church ideal (that heirs should only be conceived in wedlock) had also been internalized and accepted by most English, French, German, and Iberian nobles. There were pockets of resistance among other societies. In Wales, for example, such an idea was explicitly rejected in the native law texts known as the Cyfraith Hywel (the Laws of Hywel, a tenth-century ruler to whom the laws were ascribed) with the statement (to paraphrase): 'The laws of the Church state that only a son born in marriage might inherit, the law (ie. the Welsh law) does not believe that the son should be punished for the sins of the father'. This cultural practice was one which remained incredibly potent well beyond most other European societies. In the 1220s Llywelyn ab Iorwerth, ruler of Gwynedd and de facto ruler of most of Wales, issued an ordinance which forbade bastards from inheritance but 60 years later when Edward I conquered Wales he was forced to reissue the ordinance as apparently no one was paying any attention.
The regulation of heirs to only those born inside of wedlock was a long process which emerged from a desire to maintain the status quo (polygyny) but within Christian mores (marriage). The power of an institution such as the Church to maintain a (somewhat) consistent message over several centuries was ultimately repsonsible for a shift of attitudes within secular society.
That's the process behind the regulation of marriage, I'm not up on the statistical analysis so I can't speak for that. I think that, finally, it should be said that while bastards did not inherit the 'chief' titles they did often inherit quite substantial lands and titles well into the later Middle Ages or were granted them as apanages (see, for example, the bastard brothers of Henry II of England in the twelfth-century) or the descendents of John of Gaunt in the fourteenth- and fifteenth-centuries.