The pronunciation of 'tsuki-shirazu搗き知らず' (unnoticed pounding) was also the same as 'tsuki-shirazu月知らず' (unnoticed moon); from the north window, the moon was not seen particularly in winter; therefore, mochi pounded unnoticed in winter began being called 'kitamado' (the north window).
夜船と同じように、「搗き知らず」→「月知らず」と言葉遊びをして、月を知らない、つまり月が見えないのは北側の窓だ、ということから。