Shit The Bed Meaning

(chiefly US, idiomatic, of a person or thing) To fail.

Example: Used other than as an idiom: see shit,‎ bed.
2008, Dave Zeltserman, Small Crimes, ISBN 9781852429713, p. 41 (Google preview):
  â€œ[H]ow was I supposed to know Dan Marino would shit the bed and lose that game by nineteen points?”
2012, Tom Ryan, Way to Go, ISBN 9781459800793, p. 6 (Google preview):
  â€œYep, I totally shit the bed on that exam. Guess I'll be sticking around this place for another year.”
2013, Stephen King, Under the Dome, ISBN 9781476735474, p. 266 (Google preview):
  â€œWe're almost ready. If the damn copier doesn't shit the bed, that is.”