A good way to tighten nuts in very close quarters?
I'd bet money they used a box wrench to tighten this; you can see where it damaged the wood ever so slightly to the left and right of the nut (and the scrape it made in the center while on its way onto it).

Try using a twelve point box wrench. You might also need a hammer ;) ... and you might have to disassemble the headboard to get it out of the way. It looks to me like that lightly colored piece of plywood is an add-on, and that's why you can't get in there.



That supposed piece of plywood was the bed, so there's your access.

It needs to be an offset box wrench, or you won't have room to turn it, and you may need to seat it with a hammer for the first few turns. And as the other answer suggests, grinding down the outer edge of the tool is an option.



(source)