1841 census, Gorbals: John Waugh, 40; Mary Waugh, 25; John Waugh, 7; Andrew Waugh, 3.
1851 census, Troqueer. Mary Waugh, widow, 33, born Dumfries-shire; son John, 17, born Troqueer; son Andrew, 12, born Glasgow; daughter Sarah McKie, 2, born Troqueer; and four lodgers.
1861 census, Troqueer: Mary Waugh, 43, widow; son John, 25, widower; grandson John, 4; son Andrew, 21.
John Waugh, mother's surname Thomson, born Troqueer 1856.
John Waugh married Agnes Thomson, Dumfries, 1856.
Agnes Thomson or Waugh, 22, died in Troqueer in 1857, mother's maiden surname Menzies.
I suggest you take a look at that marriage in 1856. It will tell you the full names of John Waugh's parents, including his mother's maiden surname.
Baptism of Andrew to John Waugh and Mary Hastings in Glasgow on 5 October 1838.
Also John Hastings to Robert Waugh and Mary Hastings in Dunscore on 19 August 1830. Could Robert be an error for John, I wonder? Though the date is rather early, and Dunscore isn't next door to Troqueer.