That's a toughie. I'm curious as to what the correct answer is.
My thought is to try to relax against the seat, so that as your car is accelerated by the impact, you are accelerated with it, rather than having the seat catch up with you when it's already got a head start on acceleration. The seat, and the car it's attached to are going to be accelerated a certain amount by the impact. The more of that time you can spread your own acceleration out over, the better.
I got rear-ended in a similar scenario. Traffic stacked up suddenly, I stopped. I was trying to stop short of the car in front of me but no shorter than needed so the person behind me in the S-class Merc would hopefully not run into me. They succeeded, but the pickup behind them didn't, and shoved the Mercedes into me, but I didn't get shoved into the car in front of me.
Coincidentally, the car in front of me did hit the car in front of it. Conditions were kind of wacky (sunny/rainy/accident miles up the road causing funny patterns), and there were no fewer than three separate accident groups on the shoulder within easy view, and I watched two more happen while waiting for my tow...
But I digress... I think Kenny's probably right about the "ideal" if you're going to get rear-ended being to contact the car in front just as you stop, prior to impact from the rear. To Apexcarver's point, unless it's something big enough ahead and behind to accordion your car, you want the energy to go into crumpling your crumple zones, and not into accelerating your body...
OTOH, it probably depends on how hard you're going to get hit and by what, and what's in front of you... If the vehicles ahead and behind are big and heavy and still moving fast, I think I'd rather start the impact as far back as possible so the car doesn't get crushed as badly with some energy going into dragging my car along (assuming I can keep my foot on the brake).
In reality, not sure I'll get a chance to calculate, and not sure there's an ideal one-size-fits-all. Guess I'll try to watch for escapes (not always there), and generally try to stop before I hit what's ahead of me, and hope whoever's behind me at least manages to scrub some speed before impact...
I've been in three car accidents in my life. All three were getting rear-ended, totaling one '69 dart, one '71 2002, and one '87 325is (was driving the 325is in the scenario above). The only injury was a friend riding with me in the Dart (no headrests) who didn't know we were about to get hit... His neck bugged him for quite some time after that. I guess seeing the headlights disappear behind the trunk gave me enough notice to hold my head so it didn't get tossed around too badly. Probably dropped it forward some and tensed my neck a bit? In the 325is, I'll never know for sure what would have happened, but I'm awfully glad I swapped out the stock seat with the tired tilt mechanism for a new Corbeau...