Actually there was a post a while back with parts and repair manuals for a lot of the models.... search for it. I know there was a link to download the 5D Mark II parts manual, I'm looking at it right now (though that mechanism is probably pretty similar to the 1D manual above).
The parts catalog doesn't tell you how to disassemble, but does show "exploded" views that can help.
Basically it looks as if the front cover of the camera needs to come off to access the button and related mechanism that latches/unlatches the lens. The bayonet mount doesn't appear to need to come off, unless it's necessary to entirely remove that mechanism from the camera. You do have to remove the rubber grip to get to a screw underneath (which will mean gluing it back on later)... and it appears the end plate with all the output sockets has to come off before the front cover of the camera can be removed.
However, if it's just the little pin isn't springing back in place, that's accessed by removing only the lens bayonet mounting ring, not the front cover of the camera.
There's a little coil spring behind the pin that's supposed to push it back out into the locking position. If that spring (part # CS2-5020) is broken or jammed, it might leave the pin (part # CF1-1948) in the unlocked position.
The exploded view of the locking pin and spring parts is shown on page 18 and 19 of 28, in the parts catalog PDF. (It's imprinted "Page 8" though).
Just be careful removing the bayonet mounting ring. Sometimes there are little shims under the screws, used to precisely align the mount with the sensor/film plane of the camera. It's important to get the shims back in place, under the right screws. So be careful during disassembly, to watch for any small shims. There is also a large shim that goes under the entire bayonet mount.
Once in there, see if the spring is broken, crushed or missing from behind the pin. Or if there is gunk in there causing the spring and/or pin to hang up. You might need to replace the spring with a new one.
The pin itself might be bent or have a rough spot. Check for that, replace if necessary or gently smooth any rough spots on the pin with ultra fine sandpaper (while the pin is out of the camera and well away from it, so no particles get inside). There really shouldn't be any lubrication needed. That might cause more problems later, by attracting and adhering dirt. But, if necessary, some very light oil... just a tiny dot of it... might help. Clean the hole in the bayonet mount that the pin slides in, the pin needs to move freely. The spring behind it is tiny.
If the pin is sticky, be aware that if it ever gets stuck in the locked position, you'll have one hell of a time getting the lens off! Better to replace the pin part, if it's bent or damaged in any way.
Also, during reassembly I'd probalby put some light hold Locktite on the screws holding the bayonet mount in place, just to insure they never loosen accidentally. It's important to use a "weak" type of Locktite, not the strong stuff or the stuff that requires heating it up to make it release. Blue 242 would probably be the best type (not the red Locktite!)