Pain Medication

K
Has anyone had to take pain medication during pregnancy? I am 20 weeks, and on bed rest because of a ruptured disc and spinal stenosis. My doctor has written a script for pain medication but I have so much guilt taking it. Anyone else in the same boat?