How to sleep with a stranger

Travelling solo on a ship bound for St Helena what are the rules of engagement when one has to share a cabin with a complete stranger?