Although there is a so-called repair kit for the brake valve, this only contains replacement rubber seals. These seal the valve to the outside but they have nothing to do with the functioning of the valve itself; the sealing of the working elements rely on the very close tolerance between those parts. Once the pistons inside the valve or the cylinder they travel in wear out, the valve starts leaking (this means leakage into its return lines and not to the outside world).
Before you can judge how much the valve is worn, you have to clear it of debris and have the LHM in relatively good condition. If you haven't done it recently, flush the system of the BX or of the XM. In some cases it is the debris itself which obstructs the proper operation of the pistons and their sealing. Only when this is eliminated as a potential problem should you diagnose the valve itself.
There is a test you can do: let the car roll (contact on) after engine is stopped at walking pace, then step on the brake hard. Keep pressing. If the back continues to drop, or, even worse, the STOP light comes on within a couple of seconds, the brake valve is worn out. What happens is that the leak in the valve will continually drain the rear suspension, which will then attempt to keep its height by replenishing from the accumulator. Without leaks, this is soon accomplished, with leaks, the accumulator pressure basically just escapes via the brake valve and the suspension continues to drop, eventually the STOP light will go on as the pressure drops below the safety valve pressure threshold.
To accomplish this you have to uncouple the return lines; there are two of them routed independently to a common return collector right behind the LHM reservoir. This collector also collects leakage returns from three other elements (this depends on model and engine, as well as the particulars of the hydraulic system as there are several variants). The only reliable way to test the valve for leaks is to uncouple the return lines at the valve; be prepared that this is rather difficult to do beacuse of the poor access. You need to decouple both return lines and plug the hoses so that the other returned LHM does not leak out through them. On some variants the return hoses are retained on the valve by an additional clamp holding them in place and this makes it even more difficult to remove them.
When all done, observe what is coming out of the valve return lines themselves. Be careful not to press on the brake pedal while the return lines are off or else you will spill a seizable amount of LHM as pressure is released from the brake cylinders. The pressure involved is rather high so you'll end up making a mess.
If the valve does leak profusely (what is the prevalent reason for the rear end sinking), the only solution is to replace it. The valves are more or less similar accross the Citroën model range: BX, CX or even late DS models; there are, however, subtle differences. For one, the XM valve is slightly modified to reduce shortcircuiting the rear suspension into the return when the brake is released, plus the pipes are connected slightly differently (it is possible to connect a BX/CX valve in the same fashion).
But if you want to open it up anyway, here it goes: pry out the ring holding the rubber boot in the front (where the brake pedal was located), then remove the boot and the seal behind it. Remove the retaining ring at the opposite end of the brake unit as well. Carefully tap on the plug behind it until it starts moving outwards (clean the area thoroughly before you start). Be careful, there is a very strong spring behind this plug. If it doesn't want to come out, try pressing the main piston all the way inside (from the other end where you removed the rubber boot from). Don't apply too much force, however, as without pressurized LHM the pistons get no lubrication and can be damaged.
Now remove this strong spring and the cap which is behind it. Press the main piston all the way in again to get the two-piston assembly out in the other end. Take care not to damage its surface and the teflon seal it slides in. If this assembly slides out very easily, you might have to start thinking about a new valve, as this is a large contributor to leakage and the sinking rear end syndrome.
Don't disassemble this two-piston assembly, you cannot and you need not. But be carefuly with the little spring coming out after having removed the assembly. Now you can remove the retaining ring on the front side, which lets the main piston and another small spring behind it come out. Note which small spring came out from which side, they must not be mixed up. Use a long and blunt instrument to push out the remaining middle piston through the back end.
Remove the bleed bolt (if its tip is rusty, it is wise to think about an overhaul of the rear calipers and a good blow-through of the pipes going to the rear brakes). Clean everything thoroughly. If the pistons have large or very uneven patches of shiny, mirror-like wear, you may need a new valve soon. You receive a new O-ring for the back end plug in the repair kit but the teflon ring the two-piston assembly slides in is not replaceable. Douse everything with fresh LHM before reassembly. Be very careful of the orientation of the middle piston; if you put it in the wrong way, the rear brakes will block when brakes are first applied, and will not let go until rear suspension pressure is released. Reassembling, as usual, is in the opposite order, the last step is to get the back end plug back in its place—and with the spring behind it, you'll have lots of fun with it...