Hi Dave,
The same thing happened to our CLK while my wife was driving it, due to a rather large pothole! The reset procedure is in the handbook (page 211 in ours) but I'll quote it here to save you some time.
"The head restraints are integrated into the rollover bar.
The rollover bar is raised automatically in the event of an accident or in a critical driving situation. You will hear a noise as this happens.
<illustration of switch on centre console>
The rollover bar can be lowered again after automatic operation:
Raise the rollover bar fully by the switch, then press on lower until the rollover bar reaches its lower end position (approximately 20 seconds).
Key in position 2 in the starter switch.
1. Raise the rollover bar
2. Lower the rollover bar
When the key is in position 2 in the starter switch and the engine is running, the indicator lamp in the switch flashes for approximately 15 seconds if the rollover bar is not raised.
This is to remind you that the rollover bar with integrated head restraints must be raised when the rear seats are occupied."
Hope it works for you - it did for us
DaveA