I agree with everyone else who posted on here. Heating pads, warm baths, and tylenol can help. Also you shouldn't be laying on your back, it puts all the weight of your uterus on your back and vital veins and arteries, which both will increase your back pain and cut off oxygen to you baby.
I have had back pain pretty much throughout my pregnancy and it's even more intense now at 33 weeks. I was taking a lot of Tylenol, taking a lot of baths, using the pillow between the legs when sleeping, and the always friendly heating pad...they helped me, but the thing that has helped me the most is seeing my chiropractor! I couldn't survive pregnancy without him. I was havin headaches too he even helped me with that and now I really don't have to take a lot of Tylenol which is better for me and baby. I swear by the chiroprator and the heating pad...they have helped me the most.
Tylenol is safe. Try a shower or hot bath. U could try buying a small heating pad/blanket and use it on your back. Also ask your doctor if they have suggestions or even a pharmacy tech. They can be really helpful/knowledgable in these cases.