You can. Make sure to take ibuprofen with food as it can be hard on the stomach. The best thing to do would be to alternate the two. Flexeril can be taken every 8 hours and ibuprofen every 6 to 8 hours. Also keep in mind that flexeril can cause drowsiness.
You can take the two drugs together. Ibuprofen is an anti-inflammatory drug while flexeril is a muscle relaxant. You should however not take more than 2,400 milligrams of both drugs within 1 period of 24 hours. Please consult your doctor for more help and proper prescription of both drugs.