Limits to Emotion in Prayer(Masechet Berachot Daf לא: Perek 5 Siman 21)
(condensed from Berachot 5:21)
Gemara: “Eili thought that she [Chana] was drunk” (Shmuel I, 1:13) – from here we see that it is forbidden to pray when one is drunk.
Ein Ayah: It is true that prayer is based on a foundation of emotion and that the heart can be more energized during drunkenness. This is included in that which Chazal said: “Whoever is appeased when he is under the influence of wine has a similarity to his Maker” (Eiruvin 65a). However, one can reach the ideal only when the emotional is linked to the intellectual. A drunk is ruled by his emotion, whereas his cognitive capabilities are greatly inhibited.
Also, the obligation of prayer is not just to have one in the proper frame of mind during the prayer. Rather, the prayer should impact on the actions one undertakes thereafter. One can reach emotions that include goodness and righteousness while drunk, but this does not continue into leading him on the straight path afterward. This is because spiritual powers need a calm and collected thought process in order to distinguish between holy and mundane and between pure and impure. To someone who is drunk, the whole world seems flat (Yoma 75a). In other words, everything seems permitted and good to him and he is not able to see that improper things can be destructive. That is why one may not pray while drunk.