Well, he was in a room with people who were well versed in finding ways to inject at least one of the two with various drugs in various solutions.
There may have even been a few fresh new syringes lying around the hospital, too.
Did Daniel voluntarily take an ambien which made him sleepy? How could he have been injected without his knowledge? Did he ask Howard to help him shoot up?