I recently noticed that in my siddur (Siddur Vilna), in the fourth berakha of the Shabbes davening (או"א רצה במנוחתינו...), there's a pronominal suffix near the conclusion that changes depending on whether it is Maariv, Shacharis/Mussaf or Mincha.
On Maariv, one says וינוחו בה (the feminine singular ending), on Shacharis/Mussaf one says וינוחו בו (the masculine singular ending), and on Mincha one says וינוחו בם (the masculine plural ending).
I have checked, and have found this difference also in my Chabad siddur, Torah Or, as well as other siddurim that (like Siddur Vilna) also testifying to the minhagim of the Gra. Siddur Vilna sources it in a sefer called Olas Shabbes, and notes that this custom (while it is not universal) is also mentioned in the Eliyahu Zuta on the Levush, and by the Magen Avraham.
My question is a grammatical one.
If we use the feminine singular ending (such as some do on Maariv), the referent is Shabbes - understood as a feminine word.
If we use the masculine plural ending... what is the referent? Shabbes and something else?