Another interpretation of (Numbers 5:12): "Any man whose wife goes astray." The Holy One, blessed be He, said to her: You make sport with your husband below; do you suppose you can mock Me? A parable: To what may the matter be compared? To one who was imprisoned within two houses, one inside the other, and there were two guards there, one inside and one outside. He opened the inner one and went out, and the guard did not notice him. When he came to go out from the outer one, the guard noticed him and seized him. He said to him: At that one inside you made sport, but at me you cannot make sport. So too the Holy One, blessed be He, said to the adulterous woman: At your husband you made sport, but at Me you cannot make sport. Rather, I sit and make sport of My creatures, as it is said (Psalms 2:4): "He who sits in the heavens shall laugh."
The Sotah Who Mocked Her Husband but Cannot Mock God
Midrash Tanchuma Buber, Nasso 9:2
ד"א איש איש כי תשטה אשתו. אמר לה הקב"ה באישך של מטה את משחקת, שמא בי [את יכולה (לשקר) [לשחק], משל למה הדבר דומה, למי שהיה חבוש תוך שני בתים זו לפנים מזו, והיו שם שני שומרים, אחד בפנים ואחד בחוץ, פתח את הפנימי ויצא, ולא הרגיש בו השומר, בא לצאת מן החיצון, הרגיש בו תפשו, אמר לו באותו שבפנים שחקת, אבל בי אין אתה יכול לשחק, כך אמר הקב"ה לאשה המנאפת, באישך שחקת, אבל בי אין את יכולה לשחק, אבל אני יושב ומשחק על בריותי, שנאמר יושב בשמים ישחק (תהלים ב ד).