ogamana

going down, setting (of sun & moon), always in contrast to; uggamana (rising), therefore freq.variant reading ogg DN.i.10, DN.i.68; DN-a.i.95 (= atthangamana); Vv-a.326.

o + gam + ana; Sk. avagamana. That word is rather more than a thousand years later than the Pāli one. It would be ridiculous were one to suppose that the P. could be derived from the Sk. On the other hand the Sk. cannot be derived from the P. for it was formed at a time & place when & where P. was unknown, just as the Pali was formed at a time & place when & where Sk. was unknown. The two words are quite independent. They have no connection with one another except that they are examples of a rule of word-formation common to the two languages