Can't sleep- back pain

My back aches all night long. Im only 27 wks. I sleep with the pillow between my legs and under my belly. I have a wonderful foam mattress. But no matter what I just can't get comfortable and wake up with back pain. Anyone else have this problem or have any solutions for me to try?