You can't. Excuse me, mate, for the bad news, but that's something BIS didn't think it would be necessary.
However [good news, heh?], I've been working in a very rude way of achieving it. Basically, I store the unit position mode (UP/DOWN) in an array of arrays*, given by a condition that comparises the unit speed with minimum values. Let's say that for speeds lower than 1kmph [value not checked] and higher than 0, the unit would be layed down. If stopped, then you wouldn't be able to check it, so, leave it as is.
Now, an important hint: don't define unit position with setUnitPos, as it would prevent the unit from laying down or standing up automatically. Instead, use the switchMove command to force an instantaneous lay [_unit switchMove "laydown"] or playMove for an animated laying.
*[[unit1,"UP"],[_unit2,"DOWN"],[~_unitN,~"MODE"]]