As far as UAE is concerned, there is only one issue at hand - since you are not going to consume alcohol inside the UAE but on-board the aircraft; where they do not check your religion.
- If you appear publicly intoxicated, you are breaking the law.
That's it. So, as long as you can "hold your liquor", you'll be fine.
The problem is that "intoxicated" is not a defined in the law; unlike the US and some other places there is no field sobriety test. Pretty much you are at the mercy of the official.
So, if you appear Muslim and are smelling of alcohol; this may get you in trouble - especially if you are not a UAE citizen.
I would recommend a breath mint, mouthwash, or perhaps some other method of calming your nerves during flight. I know some colleagues they use sleeping aids to help them rest - but of course, take these at the advice of your doctor.