Here's my comment to @Crantisz's answer
I have tried this and I know that it works for the armature. The
problem is that I am using this armature to control mesh which is not
directly parented to this armature through NLA. And when I try this
method the mesh follows the original motion without rotation
This problem arises because, when using above method the main armature only copies the actions of other armatures but preserve its object properties.
So to solve this problem I inserted a LocRotScale keyframe in the beginning and at
frame - 1 where I want rotation. This prevents unnecessary transformations. Now I rotated the main armature and insert LocRotScale keyframe. This does the job for me