How to access unused pins on an atmega1280?

Perhaps an addition to the hardware/arduino/variants/mega/pins_arduino.h file?

That certainly is one way.

Another would be to use port access available in gcc-avr.