If it has a lock valve in the line , and the seal on the piston fails it will do exactly what you are talking about. I just repacked an outrigger cylinder on a customers bucket truck that was doing exactly what you are describing, and a bad piston seal was the culprit.
It can go down because there is more surface area on the back side of the piston than the rod side (due to the rod taking up space). As a result of the extra space the fluid going into the cylinder will pressurize it enough to push it down, and displace fluid from the rod end to the tail end. There is just enough pressure differentialgoing that direction to make it move out and displace the fluid past the piston. Going the other way, because of the different size area the pressure has less area on the rod end to act upon vs the tail end, and unfortunately the displacement of fluid, and lack of differential pressure, keeps it from building enough pressure to cause the lock valve to unlock and allow the cylinder to raise.
If you need to get it up you can break the lines loose and use a jack, another machine, etc to put pressure on the cylinder in the up direction. This should unlock the valve and allow the cylinder to rise with the applied pressure, but it will usually drop right back down when the pressure is taken off of it, but at least the cylinder is no longer pressurized and can be removed to be rebuild. Good luck.