Pregnancy can create new issues with sleeping. Trying to get comfortable, having to get up to go to the bathroom, having vivid dreams, and not being able to fall asleep again if waking up are common issues that can interfere with sleep during pregnancy.
Getting comfortable can be a challenge, especially if you are used to sleeping on your back. Pillows can be your best friend in this situation. Putting a pillow under a hip just enough to tilt you off your back can help in early pregnancy. As your baby grows, having a pillow tucked behind your back, one between your knees, and one to support your belly may help you with being comfortable. I am a huge fan of the pregnancy pillows that surround you, almost like a nest. As pregnancy progresses, you might need more pillows for more support, or you might want your partner to tuck you into bed, helping get the pillows just right to let you sleep in comfort and bliss.
Vivid dreams can be something else that interferes with sleep. These dreams can be weird, intense or scary. It seems like the mind goes into overdrive as you sleep, and you just don't feel as rested as you would with more normal dreams. Catnip tea, or Valerian tea are options to help you quiet your mind and let you have more restful dreams. Have a cup shortly before you go to bed.
If you are waking up often, or having a hard time getting to sleep in the first place, it might be time to add a snack to your bedtime routine. Sometimes your blood sugar can drop low enough that your body just isn't happy and it will wake you up or keep you awake. I recommend a protein rich snack such as nuts, cheese, or jerky before bed. If you fall asleep easily enough but can't get to sleep after waking up to go to the bathroom in the middle of the night, try adding in a small protein rich snack while you are up.
In the last trimester, many mothers can sleep but it is often interrupted by having to go to the bathroom multiple times in the night. Baby might be low enough to use your bladder as a pillow which means there's just less capacity in there. My suggestion for this situation is to set a cut off time for hydrating and focus on getting all your hydration in before that cut off time. Usually 2 hours before bed is plenty of time. Just make sure to start hydrating again as soon as you wake up for the day.
Hopefully, these ideas will having you sleeping through your pregnancy like a baby!