Hi there.
It is a tough one re the Scottish Pilley's as the name spelling seems to have been quite different earlier on and can make them a bit harder to track down.
There was a George Pilley/Pillie/Pyley/Peyley/Peylley/Payley/Pelley/Pillay/Pully/Pullie/Pillow who married Margaret Thomson in Leith in 1816 under the spelling Peyley, he was a Seaman.
George isn't on the 1841 census with his family. Margaret and some of her children appear at Water Lane in Leith under the spelling Pully.
Margaret aged 45 - her name was first written as Thomson then crossed out. Her occupation was also crossed out but looks like Seaman's Wife. With her was her son George aged 17 - a Paint Makers junior?, Will aged 15 same occupation as George, Alex aged 10 and Thomson aged 6.
There is also an entry in Leith for a George Pullie aged 47 (so year of birth around 1794) - he is listed somewhere with no address with several other men whose occupations look like Mer S At Sea. He seems to be down as being born in England rather than Scotland.
George and Margaret had the following children:
Isabella b. 1817 - married John Merrylees in 1842. Baptism under the surname Pyley and marriage under the surname Peyley.
John b. 1821 baptism under the spelling Payley - seems to have used the name James - became a Stoker in the Merchant Navy. He married Margaret Muirhead in Leith in 1844 under the spelling Peylley.
Agnes b. 1823 - baptism under the spelling Payley - not sure yet what happened to her.
George b. 1824 - not found a baptism entry - married Margaret Campbell in Leith in 1845 under the spelling Pilley. He is down as being a Fireman - so likely a fireman stoker in the navy.
William b. 1826 - not found a baptism entry but there is a William b. 26th Jul 1826 in Leith who is a Stoker in the Merchant Navy in 1846. He married Christina Walker in Leith in 1852 under the spelling Pillay.
Alexander b. 1831 - baptism down under the spelling Payley, married Margaret Inglis in Leith in 1852 under the spelling Pillow. He was also in the Merchant Navy I believe.
Charles Donaldson b. 1833 - not sure what became of him. Baptism under the spelling Pillie.
Thomson b. 1835 - baptism under the spelling Peylley.
Margaret seems to have died between the 1841 and 1851 censuses. George then appears in 1851 under the surname Pillow at 49 Yard Heads, Leith.
George aged 53, Seaman born in South Leith (so gives a year of birth around 1798) with his son Thomson who is now a Painter and his unmarried sister in law Elisabeth Thomson aged 36 a House Keeper.
There are several records relating to George in the Merchant Seamen's record collection on Findmypast under the surnames Peyley, Peiley. His year of birth varies, one record from 1835 states he was born at sea giving a date of birth as 18th Aug 1792 and that he first went to sea as a boy in 1804 and that he had served in the Royal Navy.
It looks like he died sometime between 1851 and when formal registration started in 1855 as I am not finding a death record for him and the old parish registers are often patchy for burials.
It really is quite tough to pinpoint much more information about George's origins, the surname spelling could be something very different and might not actually have originally been Pilley at all, or perhaps his father was in the Navy - Royal Navy or Merchant Navy and he had actually been born at Sea or indeed Leith while at port, and perhaps his family origins are in England or further back in Scotland under other surname spellings.
DNA testing might help with finding other matches to other known Pilley families in England. The main locations are in Hampshire - as there is a village called Pilley there and likewise in Yorkshire as there is also a place called Pilley there. My Pilley line in based mostly in Essex and I believe may have come from Hertfordshire but beyond that it is unclear.
Hopefully the information is of some help. I have saved some of the Scottish records images if you don't already have them.
I think the other people with the name Pilley who appear in 1841 are visitors to Scotland. There is a Henrietta Pilley in Inverness in 1841 - she is the wife of a Preacher James Pilley who is listed in Banff in 1841 under Pilly. James was from Yorkshire.
Alex