the X,Y,Z cohordinates are absolute, non relative to the place you put
your MG in the editor.
That is, use:
unitname setpos [getpos (unitname) select 0,getpos (unitname) select 1, Z]
Z is tricky to determine, cause setpos use ABSOLUTE rather than RELATIVE
heights above ground: that is, height above sea level is required.
To determine this Z, just place a gamelogic under the X,Y cohordinnates of
the unit at height 0 and then take the distance from the unit itself, and add
to this the height you want the unit to be raised above ground:
logic = "gameLogic" camcreate [0,0,0];
logic setpos [getpos (unitname) select 0,getpos (unitname) select 1, 0];
dist = logic distance unitname;
unitname setpos [getpos (unitname) select 0,getpos (unitname) select 1, dist + height]
where height is the height above ground you want unitname to be.
EDIT>
Macguba already answered part of this in the post above.