"Do not give your handmaid before a daughter of Belial" (I Samuel 1:16). From here, that a drunkard who prays is as one who worships a foreign worship [idolatry], for it is written here "daughter of Belial," and it is written there, "there have gone out men, sons of Belial, from your midst" (Deuteronomy 13:14). Just as there it refers to foreign worship, so too here it refers to foreign worship.
Why One Who Prays Drunk Is Likened to an Idolater
Yalkut Shimoni on Nach 78:15
אל תתן את אמתך לפני בת בליעל. מכאן לשכור המתפלל כאלו עובד ע"א, דכתיב הכא לפני בת בליעל וכתיב התם יצאו אנשים בני בליעל מקרבך מה להלן ע"א אף כאן ע"א: