Nasal consonants n, m and nh tend to have a closing effect the vowel
before it: a stressed open
/a/ can turn into a less open
/3/, for example in the word cama (bed).
In Brazil, this is also true of vowels o and e, which causes some spelling differences between the two countries: económico - econômico, pirómano - pirômano, endémico - endêmico, higiénico - higiênico, quilómetro - quilômetro, gémeo - gêmeo, António - Antônio, Mónica - Mônica.
It seems the effect is also at work in Portugal, considering "sonha" (I dream), which could be expected to sound as "sónha" for reasons described here. But it really is sônha (accent not written, just soundwise), as can be heard in Porto de mágoas sung by Dulce Pontes.
This probably also means, although I have no proof of that (confirmation by native speakers appreciated), that sonho (I dream) and sonho (dream, the noun) cannot be distinguished by ear, as can words like começo (noun) and começo (verb).