It is usually supportive management, but a prolonged ileus after surgery needs active evaluation for a complication.
Bailey and Love's Short Practice of Surgery, p. 347. The
Merck Manual overview also lists drugs, infection, and electrolyte abnormalities as important causes.