What is described is a device for releasable mounting an accessory (12) on an operating table (102), comprising two coupling parts (10, 100) which can be connected to each other and a mechanism for locking and unlocking. The mechanism comprises a first locking element (26) arranged on the first coupling part (10) and a second locking element (114) arranged on the second coupling part (100), an unlocking element (28) arranged on the first coupling part (10) which is biased into a locking position and can be moved into an unlocking position against the biasing, in which unlocking position it acts on one (114) of the two locking elements (26, 114) such that the two locking elements (26, 114) are disengaged from one another, a catch element (40) which is arranged on the first coupling part (10) and keeps the unlocking element (28) in its unlocking position against the biasing, and a release element (46) arranged on the first coupling part (10) which is biased into a first position and is acted upon by the second coupling part (100) when the coupling parts (10, 100) are connected to each other and is pushed into the second position against the biasing. The release element (46) acts on the catch element (40) in its first position such that the same is disengaged from the unlocking element (28).