Percocet is a drug that is used to treat pain and contains Tylenol mixed with a narcotic agent. Xanax is in the class of drugs called benzodiazepines. Xanax is a sedative like valium. It is used by some also to help with muscle spasms. What you need to make sure is that your treating physician is aware that you take Xanax on a chronic basis. Both drugs are capable of making one sleepy or somnolent and can effect one’s respiration—the reason why they should not be taken together.