I designed a shelf for my bed frames a while ago and semi-recently a customer who bought an ash frame with tall drawers (with curly cherry strip across the middle) said she’d like the first one. As you can see in the photos below, it’s designed to act as a sort of small night stand but it doesn’t take up any floor space or block the drawers. It hooks onto the lip on the top edge of the rail. The shelf under the top surface is open on both ends, so the whole unit can be placed on either side of the frame, or the end for that matter. It’s about a foot square and the top surface has a lip to keep things from falling off.
Due to the weight of it, the lack of availability of fir plywood that matches the fir frames, and my insistence on never making something that could break (I can’t be certain that the lip on a fir frame could hold the weight), these shelves are available for hardwood frames only, except alder, which is softer than fir.