Narcotic Painkillers leave your system after 48 hours. They only stay in your system through your detox period. Detoxing from them takes around 48 hours without the help of any other medicarion, such as methadone, suboxzone or bupernorphen.
Flexeril i'm not exact but i think about 7 days. Flexeril is a muscle relaxant and builds up in your system, just like Robaxin. Once built up in your system you just need to take maintence doses to keep it going. Because it is used to relax muscles it stays in the muscle fibers.