Typically, a deflection of 2.5 mm (0.1 in) is allowed, provided that the maximum pipe stress is limited to 10.3 MPa (1,500 psi) or allowable design stress divided by a safety factor of
415, whichever is less.
See page 3-7 in the following document for the formula
Depending on the end restraint conditions, the deflection will vary between the simple support deflection of 5wl^4/384EI, to the fixed end deflection of wl^4/384EI, with "I" being the the I of the pipe, and "E" the modulus of elasticity.
I don't know if it's still available, but "Tubular Steel Structures" by the Lincoln Welding Foundation has a bit of a blurb on underground and underwater piplines that has deflection information in the chapters.