I recently got knocked out when I had my wisdom teeth removed. I hardly remember what I said when I was in the process of waking up, but I am almost certain it was something incredibly stupid and the Anesthesiologist had to repeatedly tell me to stop talking (because my mouth was full of gauze and blood). The moral of the story is yes, painkillers and anesthesia are drugs and will make you do crazy shit.
Have you heard the stories about how Nazi scientists would load test subjects up with tons of DXM, open up their chest cavities while they were awake and ask them how they were feeling. While the DXM was still effecting them, they would calmly answer the questions. Then the DXM would wear off and they would go into shock and die.
What the hell, when I broke my arm, they just gave me propofol (Jacko's drug of choice), a nerve block and some gas that I guess was nitrous. I just blacked out and then woke up normally and had a cheeseburger.