I bought a light fixture for my bathroom and noticed the screw holes on the fixture are in a N/S orientation, while the junction box is in an E/W orientation. I am able to rotate the existing bracket to accommodate the different orientation (the one that came with the fixture is too small), but I'm wondering if I should replace the current box with one that has a N/S orientation, or if I can screw holes through the drywall to hold the fixture. I did rotate the one piece of the bracket to go into a N/S orientation, so I could attach the fixture to that, but that part of the bracket doesn't screw into anything behind it. The fixture will go on the wall, not the ceiling.
There is a round plate adapter made to give you the right orientation. Any lighting supply house can help you. Good Luck.
There is no code or rule that says you can't mount a fixture directly to the dry wall. I would use something like a 4" toggle either 1/4 or 3/8. But as @Harper has pointed out there are codes and rules about using that space for a junction area. This is one I would run by the AHJ first.