The family appears to have been in Maughold (not Ramsey) for the 1841 census, under "CASTANE":
1841 Maughold, 1 19 81 Learernie:
William CASTANE 25 Joiner b.Isle of Man
Ann CASTANE 25 Isle of Man
Henry CASTANE 4 Isle of Man
Ann CASTANE 3 Isle of Man
Elizabeth CASTANE 1 Isle of Man
Wife Ann, son Henry and daur Ann bapt German (Peel = census) according to the IGI, and the others b.Ramsey.
In the 1881 census son Henry COSTAIN, 44, sawyer, & wife Margaret [Moore] 43, are living in Maughold at 5 Barrack Yd., with son William 21, daur Jane Christian COSTAIN 15, and boarder Charles Wm. GREAVES aged 7, fisherman's son.
There were a number of Costain families in the Maughold parish register from the 1600s onwards, with spelling which varied between Costen, Costeen, Costean, Costeane, Cotteam, and Costain. During the 1600s Costeen wills were easy to confuse with Corteen. When writing about CORTEEN in early land records, Constance Radcliffe wrote that Donald “McCostean” was entered for Corteen land in 1511, explaining that J.J. Kneen gave Corteen & Costain as variants of each other at that time.
Sue