Although you can take ibuprofen for a few days, unless your doctor has prescribed it, it is not recommended that you take it on a regular basis to relieve pain. Ibuprofen and other pain relievers can irritate your stomach lining, causing anything from mild nausea to ulcers.