If it's the cab I would check the rear shackle mounts on each side that attach the cab to the frame. They could be broken or the rubber bushings could just be gone depending on how bad it is.

If it is the bed I would check the wood blocks between the frame and the bed