A milking device with a sampling device with a block-and-bleed valve assembly, and a method for cleaning thereof. The valve assembly comprises two three-way valves (8, 12), connected by a connector (11) and each having a bleed (10, 14). The method provides cleaning of the valves and the bleeds by pressing pressurised cleaning fluid to the sampling device side of the valve assembly, wherein the sampling device itself closes off the fluid passage, using a predetermined accumulator function. After switching the valve assembly to release the accumulated fluid, the latter can also clean the bleed that was closed during accumulating the fluid. Thus a simple and reliable valve assembly, and method of cleaning same, is obtained.