I definantly cannot say with absolute certainty, but I could easily believe that taking Ambien could be a catalyst for anxiety attacks. Most definantly while under the influence of Ambien. It definantly can produce some strange psychological reactions and is abused by some for the strange hallucinatory states it can induce if you force yourself to stay awake on it. Despite what the manufacturer says, Ambien only put me to sleep the first few times I used it without giving me side-effects in the morning. After a while I would wake up feeling like a deer caught in the headlights, even after 8 hours of sleep. I would be completely disorientated and that in itself would cause panic attacks as I'd wake up not knowing what was going on and have someone in my house telling me I needed to rush to work. I'd take a shower and get dressed and run out the door still not fully-aware of what was happening.
Oxycodone on the other hand I do not see as something that would cause anxiety attacks. Not on it, not after it's worn off. But if you were starting to develop a physical addiction, a slight one, some of the minor withdrawl symptoms might manifest themselves in ways that would make you feel anxious. Sweating, irritability, slight physical discomfort throughout your body. And being that the symptoms would be so light, they would probably seem to come and go through out the day. So if you're taking it regularly, this could be the culprit.
Or maybe you're just stressed out and having minor panic attacks that aren't drug related.