Does anything have to be done in order for my game to take advantage of variable refresh rate technology supported by some displays, such as G-SYNC and FreeSync?
Roughly speaking, no, nothing special.
For some drivers/systems you must run in exclusive fullscreen mode, but otherwise these technologies are transparent to the application.
Note that you need to actually be able to take advantage of faster refresh rates to see any benefit. Your game's logic will run at a fixed timestep (fix your timestep so you need to be able to animate and render on an independent an unfixed timestep.
Note that some games might appear to have jerky animations with adaptive sync (or just a high frame rate monitor) that otherwise appear smooth on non-adaptive systems with vsync enabled. That behavior can be caused by games with wildly varying frame times (which can be a problem with vsync if the frame times oscillate widely enough to bounce the game between 30hz and 60hz). The reason is because animations are generally advanced by the prior frame's time, so oscillating frame times mean you might have (for exmample) a 5ms frame followed by a 10ms frame that only advanced animations by 5ms followed by a 7ms render that advanced animations by 10ms, and so on. You want frame times to smoothly change over time and not jump around a lot. That can be a lot more easily said than done for some games, though.
It depends which API you’re using to develop your game. Direct3D has a SwapChain flag AllowTearing, in addition to a Present() parameter of the same name. These are specifically for supporting variable refresh displays, where your Vertical Sync option (in the case of nVidia) is set to “Fast”.