How to sleep

Hi Ladies! I am 25 weeks pregnant and I have been sleeping on my side since the beginning of the second trimester. Quite a few of my gfs who have been pregnant recommended this and I have also read this online. My doctor just told me today at my appt that I can sleep on my back and it’s not an issue. The reason this came up was because I am having trouble sleeping (I was always a back sleeper). What have your doctors told you?