The Hammer of Thunderbolts, a legendary magic weapon, has the following property amongst others:
While you are attuned to this weapon and holding it, your Strength score increases by 4 and can exceed 20, but not 30.
Let’s say that a creature meets all the requirements to attune to the Hammer (wearing Gauntlets of Ogre Power and a Belt of Any Giant Strength) but, for some reason, does not have a hand free to hold the Hammer (either because the creature lacks hands, or because they are occupied doing other things) and does not care about any of the Hammer’s additional properties (does not want to attack with it).
Could that creature hold the Hammer (in order to benefit from its Strength increase) with something else than their hands (such as their mouth, for instance), potentially suffering from some penalties by doing so if need be?