ibuprofen & pregnancy

Am I able to take ibuprofen ? My back has been killing me every night for weeks and I’m constantly in pain and I’m NOT SLEEPING At all and I’m loosing my mind ..