The medrash Tanchuma on parshas Balak #9 says ויאמר בלעם לאתון כי התעללת בי(בלק כ׳ב כ׳ט). אף על פי שמדבר בלשון הקדש גוי לשונו סרוח. The Etz Yosef explains that התעללת is an impure expression as we find it used ויתעללו בה כל הלילה.
The question is we find Hashem saying the same expression in parshas Bo 1:2. ולמען תספר באזני בנך ובן בנך את אשר התעללתי במצרים.
How can we hold this terminology against Bilaam if Hashem said it too?