Sleeping wth newborn in bed

So I know it’s so dangerous but it’s the only way we both can sleep!!??? Is this ok I heard some co sleeping can reduce sids