What is the meaning of [Misery acquaints a man with strange bedfellows]

From Shakespeare’s The Tempest, 1610:

Alas, the storm is come again! my best way is to creep under his gaberdine; there is no other shelter hereabouts: misery acquaints a man with strange bed-fellows. I will here shroud till the dregs of the storm be past.