Is Cyclobenzaprine (flexril) safe


I have a really bad pinch nerve on top of horrible hemorrhoids and was wanting to know if I can have Cyclobenzaprine to help me sleep and ease pain. I believe i was given one before at the hospital when I had lots of round ligament pain.. but can't exactly remember