The drug itself has a short half-life - meaning that every 3 hours or so, the level in the blood drops in half. After 12 hours or so, there is still a trace in the blood, and ambien is very potent. Plus, the effects on the brain take time to heal, even after the drug is gone. Ambien is a drug from hell, and some people don't react well to it. The effects from taking it can easily last 24 hours
There is also the other drugs they have probably given him to consider. You definitely want to tell his Doctor this, if they don't already know.