There are relatively simple ways to do both. The following is how I would do them.
Gyro:
(This assumes the gyro is mounted so that it's measured axis is parallel to the ground and drive base. So it measures pitch)
A simple PD controller should suffice for a single balancing routine. You may or may not want to add I if you plan to run it with multiple robots.
The PID controller's output is fed to the drivetrain's forward/reverse power. Simple as that
Accelerometer:
You would call atan2(accel.getY(), accel.getX()) to get the robot's Pitch angle relative to the ground.
Follow the PD controller advice from the gyro.
Personally, I would go with a 2+ axis gyro. Mounted so that it would measure robot yaw and pitch.
Two PID controllers are running at the same time. One makes sure the robot is parallel with the bridge(don't want to balance if you're > 45 degrees to the bridge

). The other behaves as above, maintaining the pitch.
Sure, it's a little more complex, but it saves the driver the trouble of maintaining heading while on the bridge.
Controls wise, I would make all of that run only while a button is pressed. this allows for quick cancellation just in case something happens on the field.
Then again, you can go completely open loop and put all of this on your drivers. With practice, single robot balancing becomes a cinch. But the real fun happens when you get two or three robots on there

. The sensor way to go doesn't care about other robots in the way.
For all of the methods, I would shift into low gear.
Ask away if you have any more questions.
Jeremy G.