Can you sleep on stomach and back?

I’m 5 weeks pregnant and wondering if I can sleep on stomach and back?