Does Teferi, Time Raveler prevent casting spells for their madness cost?
Yes, you are correct. Opponents can't cast cards by using the madness ability. Teferi, Time Raveler's restriction applies to madness as well.