Sounds like one of many sensors could be starting to fail. Like Reef said, shot in the dark. If you want to start without scanning your truck, start by checking all electrical connections, including the wires for chaffing. My truck went into "limp mode" on me a couple of times, right before it started just shutting off and not restarting until it cooled. My problem ended up being the IPR solenoid shorting out.
01 F-250 SD 7.3 POWERSTROKE SUPERCAB/LONGBED 146K MI, 3 gauge pillar, diy tymar intake, Edge Evolution Tuner, 26 row 6.0 trans cooler