What is the relation of the word Bedlam to Bethlehem?

The word bedlam, now used to describe a scene of uproar and confusion, was originally a contraction of Bethlehem.

It referred to Saint Mary of Bethlehem, a religious house in London that was converted into a hospital for the insane in 1402.

The term came to mean a lunatic asylum, one of its inmates, or the type of environment one might expect inside.