Our Terex bucket got stuck in the up position about two weeks ago (at the shop, thank goodness). After fiddling around with the electric PTO for a while it came down, but still wasn't right. We have had issues with the "demand throttle switch" in the past (hydraulic/electric switch that tells engine to rev up when boom trigger is depressed), so we ordered a new one and replaced that. No luck.
Long story short we took it to the shop where they had it diagnosed and fixed in an hour. Turns out the ground wire to one of the batteries was attached to a positive terminal, which was totally screwing up the computer. Not sure if it was sporadically disengaging the electric PTO or what. We had had the truck in for some bed work (at a different shop) about a week before these issues. Their guy noticed how sluggish the truck was to start in the cold and suggested putting 3 new batteries in. They were borderline anyway, so we said go for it. Well, with 3 batteries in sequence he must have lost track of that ground wire. It really messed things up, but for some reason we never connected the dots between putting in new batteries and the entire boom not working.
Any chance you've messed with your batteries lately?