I am a chronic pain patient, with severe back and leg pain from injuries sustained in a serious car accident (multiple rollover and crash into a tree at highway (70+ mph) speeds). I am legally prescribed, and take daily, opioid painkillers to properly manage and control my pain. They are only one aspect of a multifaceted pain management regimen but are the only thing relevant to the topic.
Some people are astonished that I am legally able to drive, let alone own and use firearms, because of ignorance or misconceptions about pain management and the appropriate use of opioids.
I have been prescribed and taken opioids daily for several years, and have developed tolerance from the side effects. My reaction time, level of consciousness, mental 'clarityi', etc. is in no way negatively affected by the medications I am prescribed. While it is not required, I have paid for reaction time tests that show that I am not impaired by my medication. My lawyer also has depositions on record from both my primary care physician and my pain management specialist that state that they have examined me, have agreed on the treatment plan (including the opioid medication), and that I am tolerant to the side effects of my medications and that no restrictions on driving or operating machinery are necessary. When I started getting into shooting, I consulted my lawyer, who obtained updated depositions from my doctors to specifically add that no restrictions on owning or using firearms are necessary.
DISCLAIMER: I am not a lawyer and am in no way authorized to give legal advice.
While my situation is a bit different because opioids can be legally prescribed by a doctor in any state and they are not 'Schedule I' (illegal to use or possess) controlled substances under federal law, I would suggest that anyone who owns firearms and uses medical marijuana in a state where it is legalized to consult with an attorney and obtain similar declarations from your doctor(s) as to whether your level of consciousness, reaction time, mental 'clarity', etc. is or is not affected.