Under the bed usually need a subframe to make room for the pistons. And I’ve never seen one on a trailer ……
Under the bed is ok, longer the bed the better a front telescopic cylinder is in my opinion. My dump truck is under the bed, but it’s just a 10’ bed….