If you are blocking for structural strength (not fire protection or nailing surface), wouldn't it be better to put the 2x4s sideways, oriented the way they would be in a built-up header?
it doesn't matter, because the stresses on between-stud blocking is 100% horizontal compression. The vertical orientation of the deep face absolutely doesn't matter...though having it horizontal, spanning the full width of the studs would help to prevent torsion/twisting forces, and thus would be ever-so-slightly preferred.
Horizontal blocking IS used with 2x lumber on edge for non-structural reasons: grab bar blocking, plumbing fixtures (notably freestanding wall sinks) and kitchen cabinets.
Its usually shifted to the front of the wall, just behind the drywall. For sinks, 2x6 is usually used, allowing a range of mounting heights, ditto for grab bars in baths and showers.
One time for a steel stud wall in a basement, I used an entire sheet of 3/4 plywood over the studs and under the drywall. It let me freely mount upper and lower cabinets for a bar area.
In the case of a 2x6 "wet wall" (used for plumbing, especially drains), the blocking can be "let in" in a continuous piece for additional strength, spanning several stud bays.
Everything pulls down. So props that hold things up resist gravity. Vertical members hold things up.
Headers are spans that sit on things (jack studs) that hold things up. The header isn't the support, the studs (hopefully tied eventually to foundation elements) are.
So, vertical members, including vertical blocking, are the real support. But if you need to support over a gap where you can't put a vertical member, the horizontal header conveys the weight to the sides, where vertical support takes over.