This entry of the Diccionario panhispánico de dudas explains the uses of the diéresis or crema (the ¨
mark) in Spanish (it is mandatory over a u to indicate that this vowel must be pronounced in the combinations gue and gui, as in vergüenza, lingüística), but it gives no hints on its origin.
I would like to know the historical origin of this sign.