Where the bed pushed foward there will be kinks in the top rail, I'm guessing in two locations. I would hook ratchet straps to the top rail were those kinks are(make shure you put something between the hooks of the straps an the rail to avoid scratchs) and the other ends to the tydowns at the tail gate and start pulling slowly. You might have to start pulling a little past the strait line because it will want to spring back to get it strait.
I would suggest adding a brace to the top rail to strengthen it, either alluminum angle or stainless. Thats what we did to my buddys truck and its been doing fine for a few years now. Hope it helps.