Last year, CHP officers pulled over Santa Clara resident Steven Fernandez for driving dangerously on Highway 101 near Bailey Avenue in Mountain View.
Officers say Fernandez did poorly on the field sobriety test even though they didn't detect any alcohol.
A blood test showed he had the prescription sleep aid Ambien in his system.
Fernandez claimed he was "sleep driving." The prosecutor in the case says the evidence proved otherwise.
"So the jury watched a video taken from the CHP vehicle of the initial interaction with him and for about two hours as to why he was going to the hospital," prosecutor Jing-Lan Lee said. "He said he was going to the hospital and he was able to talk about why he thought a prescription, being under the influence of a prescription, should not constitute the basis for a DUI."
The "sleep driving" defense is increasingly popular for people pulled over after taking Ambien or other sleep medications. And although it's a real thing, experts say it is very rare.