I purchased a standard pine 2×4, typically used for studs, for about $2.50 from my local hardware store. I drilled 4 2.5” holes in the board with a paddle bit and then cut to the edges of those holes.
Since I already had tools, the most expensive part of mine ended up being the 3“ C-Clamps I needed to hold the rack into the truck bed. Since I built this, however, I've realized that those might not have been necessary.
First, it would have been a good idea to put a small piece of 1×2 under the rail on the truck. A second piece of 1×2 could be set next to that with a small gap (again for the truck rail). Finally, a small piece of metal could be lag screwed to the top. A thick metal piece for attacking 2×4's together would probably work. Here's a diagram showing what it might look like.