I re-watched the end scenes and it looks like the stock easily rotates depending on where it is resting. It's more apparent when in motion as the screenshots usually catch the stock tucked between Kirk's side and right arm which puts it in a vertical position.
But when it leans against him without his arm forcing it vertical it leans to the body or sometimes goes horizontal.
http://tos.trekcore.com/hd/albums/1x03hd/wherenomanhasgonebeforehd630.jpg
http://tos.trekcore.com/hd/albums/1x03hd/wherenomanhasgonebeforehd858.jpg
Maybe the stock worked loose during filming and Shatner was consciously holding it that way to keep the stock vertical?
But when it leans against him without his arm forcing it vertical it leans to the body or sometimes goes horizontal.
http://tos.trekcore.com/hd/albums/1x03hd/wherenomanhasgonebeforehd630.jpg
http://tos.trekcore.com/hd/albums/1x03hd/wherenomanhasgonebeforehd858.jpg
Maybe the stock worked loose during filming and Shatner was consciously holding it that way to keep the stock vertical?