Riding under the influence of any medication which impairs your riding is permitted:

Many prescription and non-prescription drugs may impair the safe operation of motor vehicles. It is illegal to operate a motor vehicle on Illinois highways with any trace of a controlled drug, substance, or intoxicating compound in your blood.
DMV Writen Test