A rock drilling rig (1) is provided with a rock drilling machine (6) comprising an impact device (4), a feed device (9) and a tool (7) with a drill bit (8) at the end thereof for breaking rock. The impact device is arranged to cause a stress wave to the tool and from there further to the rock to be drilled. During drilling at least some of the compressive stress wave (.sigma.i) caused to the tool is reflected as a stress wave (.sigma.r) from the rock back to the tool. The method comprises determining a momentum (P r) of the stress wave (.sigma.r) reflected from the rock to the tool and adjusting the operation of the impact device and/or that of the feed device on the basis of the momentum.