Is this true for both men and women? If they did, would they usually marry close to their age or would they generally marry younger people (especially men vis-à-vis women of childbearing age)? Would marriage alliances that could not result in children due to the ages of one or both of the spouses hold the same weight as those that at least theoretically could?
Not typically. Let me link you to one of my previous answers:
Why did large age gaps in marriage go from being common to being unpopular?
The most appropriate section of it is this:
The stereotype of the aging king marrying a beautiful young girl as a trophy and sexual object is no doubt as popular as it is in the Anglosphere due to Henry VIII of England. But royal marriages were about much more than individual sexual desire.
Yet ultimately, Catherine [of Aragon]’s case demonstrates the extraordinary difficulties a queen faced in being the living link between two countries. Her role was not merely symbolic; she provided each monarch with an ambassador who possessed a unique tie to the other monarch and therefore unique opportunities for persuasion. Moreover, aside from the genuine affection Henry may have felt for her, it was important that he perform publicly his care for her happiness in England; such attention illustrated how highly he esteemed Spanish ties. Her presence was therefore essential to the success of an alliance. Yet it was a delicate balance for any queen to achieve: to find a way to assimilate into a new court, to be fully committed to the welfare of that realm while still representing the interests of her native country.
(from The French Queen's Letters: Mary Tudor Brandon and the Politics of Marriage in Sixteenth-Century Europe, Erin Sadlack)
The vast majority of marriages involving at least one royal person were arranged for political reasons - to seal a truce, to reassure an ally, to provide "ambassadors" as described above. Thus, to be incredibly broad, the norm for royal marriages in the middle ages and early modern periods was that they were arranged between children/teenagers by their adult parents. Edward IV of England, for instance, betrothed his daughter, Elizabeth, to the son of the Earl of Warwick in order to shore up their relationship. Juana I of Navarre was betrothed to the future Phillip IV of France as an infant, and the two were married when she was 11 and he was 16. Maria Carolina of Austria, sister of Marie Antoinette, and Ferdinand IV of Naples (III of Sicily) were betrothed by her mother and his father and married in their teens. You can find more of this easily by picking royal Europeans at random and looking at their personal histories.
There were exceptions, though, even beyond Henry VIII. Like I said, royalty tended to marry for political reasons - and there were not always two royal children of the proper ages at hand. Mary Tudor was married to Louis XII of France to cement a peace treaty: she was 18 and he was 52, with no living sons and an heir that was already married to his daughter. Richard II of England famously married Isabella of Valois as a peace measure in the Hundred Years' War when he was 26 and she was 7, because like Louis he had no "heirs of the body". To be very broad again, when you see an extreme gap in age between two royal spouses during this period, it's typically due to necessity - a marriage had to happen, and there was no young prince around.
So it was not ideal, but an older king would sometimes remarry, and when they did so it was to younger princesses who were their parents' alliance-making pawns.
Queens typically did not remarry, likely because they didn't need to, as they were widows with financial power, but also - they couldn't really participate in alliance-making marriages as they were older, and marrying below themselves could result in Problems. However, there are always exceptions: Katherine of Valois (1401-1437), widow of Henry V of England, married into the Welsh Tudor family; Catherine Parr (1512-1548), widow of Henry VIII of England, married the courtier Thomas Seymour; and Giovanna I (1325-1382), queen regnant of Naples (which is also a different situation than a widowed queen consort), married three times after her first husband died. However again, these women were all younger than fifty when they remarried, and as you can see, only one of them even made it to fifty. I don't believe it would have been impossible for a woman to marry after fifty, but it would have been seen as very strange. For the most part, women who were beyond childbearing age when their husbands died simply remained widows, and sometimes went into convents.