Common resistor for pulling up unused pins of ATmega2560
Since they are "unused" then yes, this can be done. However care should be taken that pins of different designs are not used. In theory you might want a slightly lower resistance value to make the pullup "stronger."

If the pins are high impedance/inputs then this shouldn't ever truly become a problem. There is leakage current and so this might be something to consider since all of the pins will be pulling from that resistor's node. It might also not mean anything for you, which is fine too, design permitting.

Just remember that the pins are tied together and that if one ever becomes an output and pulls the line down, all the pins are affected in some way.