Yes - it is enforceable, and it applies to any medication that could potentially make you drowsy or otherwise impaired - both prescription and over-the-counter.
However, some places vary in their attitudes. E.g. a diabetic who takes too much insulin and becomes imparied while driving, could be charged with DWI, but not all states/jurisdictions will treat them as such.