From what I can find, Maximiliana Maria never seemed to marry, so her marrying Janos after his ascent to the Polish Throne is a definite possibility. Here's my idea:
1571-1572: Janos Sigismund, Prince of Transylvania and Lord of Parts of the Kingdom of Hungary, quite ill and not likely to live, manages to pull through his current illness and in December arrives in Poland, to be greeted by his cousin, the King Sigismund II Augustus. They discuss much and by March it is agreed that Janos is the heir to Poland, should Sigismund not remarry and sire and heir, which is an unlikely possibility. This unlikeliness goes to impossible with his death and Janos rises to Poland's Throne as John II of Poland.
1573: Now a King, negotiations for the hand of Maximiliana Maria of Bavaria renewed, although there is talk of another match with Dorothea of Lorraine, which faltered when they could not assure the Polish King she could provide him with an heir. Eventually, the match was settled, despite word from England that Elizabeth I of England might hope to have him as a possible husband (yet another opportunity for Europe to dance for her hand), to which he requested the hand of the imprisoned Scottish Queen's hand as a way of annoying her. A cruel joke on the entrapped woman, Mary was said to have wept at the news she'd soon be free and remarried, but it was for naught as the negotiations, as predicted, failed, and in December the Bavarian girl began her trip to Poland.
1574: Joined by his Queen, the celebrations were massive and done under the Unitarian ways, this being part of the marriage deal. However, his bride, as promised, was free to worship in her own, Catholic manner. Whatever their religious differences (of which there were little to no quarrels about), the two were well suited and Maximiliana Maria was said to have caressed her husband almost indecently in front of the French ambassador. But, for all the hopes, they did not have an heir within a year and the Christmas celebrations were hopeful that soon a Prince would be born.
1575: Their second year of marriage was as both blissful as their first, while also as painfully barren. The King signed a treaty with Henri III of France, with Queen Maximiliana Maria and Queen Louise, and both made pledges to name their first daughters after each other, with a correspondence that lasted for many years.
1576: This year was the year that both Poland and France celebrated the births of heirs. In France, Louise of Lorraine struggled through what would be her only pregnancy, giving birth to the Dauphin Henri de Valois. In Poland, Maximiliana Maria of Bavaria announced her pregnancy in May, giving birth to Sigismund of Poland on the 2nd of December.
1577-1579: The birth of an heir to John II of Poland allows him to feel quite vindicated in his pushing of Unitarianism, even gaining the support of his Queen, who converts soon after the birth of Sigismund. He also continues his alliance with France, beginning a war with the Hapsburg Family by declaring he is, in fact, the King of Hungary. Eventually he agrees to end his fight for the Throne of Hungary again with a marriage alliance between the two families with his son and his cousin, Anna of Austria.
1580: The birth of a second child, this time a daughter, was a boon to the Polish royal family. Knowing his French alliance had weakened with the betrothal of his son to Anna of Austria, John II of Poland named his daughter for the French Queen, Louise of Lorraine, and agreed to a betrothal between his daughter and the Dauphin.
1581-1584: With their two children, John II of Poland and Maximiliana Maria of Bavaria begin to fall into the patterns of a happy royal family. A trip for 1585 is planned for France, with the intention of leaving the Princess Louise to grow up with her future husband. Along with this, the Archduchess Anna of Austria arrives in early 1582, meeting her husband-to-be and soon becoming quite a favourite of her aunt and future mother-in-law. A miscarriage in 1583, a mere week before the December celebrations for the Prince's birthday, begin what will be a bad year for the royal family. The loss of what would have been his third child is hard on the King, who confesses to friends that this might be the end of his love for the Queen. To add to their misery, in May of 1584, the Archduchess Anna finds herself ill, and in June is laid to rest. With that miserable business done with, the King begins to look for a new bride for his growing son, only to find his headaches, always a minor issue, becoming worse by the day and in September he takes to his bed completely. His Queen stays by his side every moment she can and is there at his death, on the 17th of November, 1584. Thus, after a short period of planning, Maximiliana sees her son's coronation as King Sigismund III of Poland on the 3rd of December, 1584, aged 8.
1585-1589: Having found that her son's position is not fully safe, Maximiliana Maria instead sends her daughter away alone to France as had been intended, with only mourning clothes and the promise of money. Having arrived in France, Louise of Lorraine takes it upon herself to coddle her namesake, referring to the Polish Princess as her daughter and having her mourning clothes changed in September to a series of blue and purple dresses, which she felt more suited the girl. Despite this, a portrait sent to her mother in 1586 showed the future Dauphine dressed in her mourning, with a headdress Maximiliana Maria had sent her daughter during Christmas.
In Poland, the new King relied heavily on his mother, who relied heavily on his advisors and those who had advised her husband. The push for Unitarialism to be widespread was halted and in the coming months after her husband's death, without his constant influence, the Queen returned to Catholicism, particularly because her daughter was also Catholic and had been since birth (due to her betrothal to the Dauphin). In 1589 the King of Poland was betrothed to Anna of Prussia and Jülich-Cleves-Berg, who's portrait was placed in his room.
This time ended in 1589 with the death of Henri III of France, leaving his son, the 13 year old Dauphin, as Henri IV of France. His betrothal with Louise of Poland rock solid, he promised to keep the "most ancient alliance between our two great nations". His mother took her place as regent and attempted to, as his sister-Queen Maximiliana Maria had done, keep the peace in all matters of religion.
1590-1595: The marriage between the Prussian Girl and the Polish King took place in 1593, when both parties had properly reached puberty. With her son now set to begin procreating, Maximiliana Maria of Bavaria begun planning a trip to France, to witness her daughter's marriage in 1594. Never a glamorous woman, a portrait from 1593 shows the widowed Queen Dowager of Poland as a somewhat dumpy woman now, preferring a sack-like gown to the defined waistlines of the popular fashions.
Her arrival in France was met with respect and a tearful reunion between her and her daughter, who had grown into a minor beauty, although one man in 1600 would describe her as
"totally too short and too red to be pretty." Due to this ruddy complexion, she followed the trend begun in England and took to wearing lead based white makeup to seem paler. She had also begun to wear darker colours again, much to the disappointment of her mother-in-law, who would continue to send her bolts of blue silk for the next few years.
The marriage proved unsuited. Louise of Poland and Henri IV of Poland were as different in all things as could be. Her husband, Henri de Valois, was a delicate young man who hated everything that didn't fit into his view of the world. He preferred his François Annibal d'Estrées, the brother of Henri III of Navarre's mistress Gabrielle d'Estrées, to his wife quite blatantly and his other lover, a cousin named Marie de Lorraine. On top of the two people above her in her husbands affections (made even stranger by Henri IV's insistence his lovers marry in 1595 and that they have a child, named Henri after the King and also made Count of Maine), she was both much shorter than her husband and much fatter. Despite this, they proved a good match genetically and after a year of marriage, in October of 1595, Marie Louise de Valois was born.
Now I'm tired, so here's a family tree:
John II of Poland, Prince of Transylvania (b.1540: d.1584) m. Maximiliana Maria of Bavaria (b.1553: d.1614) (a)
1a) Sigismund III of Poland (b.1576: d.1630) m. Anna of Prussia and Jülich-Cleves-Berg (b.1576: d.1625) (a)
1a) Sigismund IV of Poland (b.1599)
2a) Miscarriage (c.1601)
3a) Stillborn Son (c.1602)
4a) Isabella of Poland (b.1604: d.1608)
5a) John of Poland (b.1607)
6a) Miscarriage (c.1609)
2a) Louise of Poland (b.1580) m. Henri IV of France (b.1576: d.1604) (a)
1a) Marie Louise de Valois (b.1595)
2a) Henri de Valois, Dauphin of France (b.1598: d.1603)
3a) Miscarriage (c.1600)
4a) Francis III of France (b.1603)
3a) Miscarriage (c.1583)