It is so easy to fall into the trap of thinking that commonly used over the counter self-medication is generally OK. Undesirable side effects that may only affect a few people can be significant and impact on performance. It is important to carefully read the medication’s contra-indication small print, and if you don’t absolutely know for sure consider yourself as one of those who will suffer the side effect.
Clearly, it is also important to note that this issue not only applies to pilots but numerous other roles in aviation where, if a person’s performance is degraded by side effects from using over the counter medication, the consequences can be significant and potentially catastrophic. Cabin crew, Engineers, ATCOs, Apron staff, Drivers, Load controllers, and the list goes on, are all key aviation workers who may be affected by medication side effects. Being drowsy or distracted because of the side effects of medication can cause a mistake starting an error chain or leading straight into a potential accident.
Everyone must act responsibly when it comes to medication of all kinds, no matter what it is. You also have a responsibility to keep a careful eye on your co-workers.
Here is an interesting article that looks at this in the FAA sphere and provides some further background.
There is also information within the Airworthiness OTAC 66-1/145-9.