Wiki on Rattlin' Bog says "popular Irish song" which just means it was sung there IMHO. Origin still unknown.
Song Meanings .com are even less helpful.
The most edifying reference I can see is (guess where) here on the 'Cat.
Rathlin' Bog so I will add my 6 pen'th.