I agree with Philippe as well; the Giant estuarine moray, Strophidon sathete (Hamilton 1822) (family MURAENIDAE) matches with having a small head and a very long tail. The species lives in burrows in mud bottom, usually in estuaries and river mouths, in the Indo-West Pacific from the Red Sea and East Africa east to the Philippines and New Guinea.
Clearly S. sathete, notice also eye much closer to snout. Note also that the species needs further taxonomic revision. I was informed that based on CO1 data, at least two potentially distinct species exist.
I've seen and collected some of these in S India. It is a Strophidon sathete. I have a similar specimen that I've collected in Djibouti back in 2007 which is Strophidon but from another (probably yet undescribed) species. The voucher is with me but waiting for time.
Strophidon sathete is one of the abundant brown unpattern eel along the Indian coast. Also similar brown un-patterned eels like Gymnothorax dorsalis and Gymnothorax prolatus are also frequent along the coasts of India. I hope the information will help you in further encounter with such brown un-pattern eels in Srilanka too.
hello Dr. Anil, your explanation is very accurate. If you note the last pix, the behaviour of knotting their tail or entire body usual habit for Strophidon sathete