The question of the legality of driving while impaired by the side effects of legal drugs raises the question of measuring drug intake and its effects. There is no practical system to enact statutes for medications like there is for alcohol. The same drug does not have the same effects on different persons. It is also not possible to establish rules for the hundreds of different drugs people take.
However, if you fall asleep behind the wheel because of drugs you have been taking, you will be held accountable for the damage you cause in a crash. The states of Illinois and Wisconsin have strict "per se" laws that forbid any presence of a prohibited substance or drug in the driver's body while operating a vehicle. This means that if you are involved in a crash, you can be tested for the presence of drugs and charged for driving under the influence.