What is the origin of confirmative phrase "of course"? I assume it has something to do with sailing maybe?
Seems you are right
Phrase of course is attested from 1540s; lit. "of the ordinary course;" earlier in same sense was bi cours (c.1300).
The NOAD reports that the origin of course is Middle English: from Old French cours, from Latin cursus, from curs- (run), from the verb currere.
(See also the definition of course given by Oxford Living Dictionaries.)