You pretty much already described the accepted theory of how a case system has emerged:
"grammaticalization of various postpositions, prepositions (this one morpheme could also be a prefix) and particles"
This is expressed as the cline of grammaticality (oft mentioned in answers here), developed by Hopper and Traugott:
content word → grammatical word → clitic → inflectional affix
There are fairly well attested instances of the development of individual inflectional markers but none (as far as I know) of a whole system that would not be the result of contact rather than "organic" grammaticalization. The Wikipedia entry on grammaticalization has plenty of examples. If you want enter link description heremore, you can try the Oxford handbooks on grammaticalization and case where a lot of the key researchers in the field wrote contributions. The chapter on diachronic view of the case lists the main processes by which individual cases arise.
Editorial: While grammaticalization is a very plausible (and well documented) process of the development of individual forms, the examples given usually describe the emergence of new structures within existing inflectional systems or the very beginnings of inflection in non-inflectional systems (as in Creoles). However, the question of how a complex inflectional system such as the Slavic case system can emerge as a whole. Did it appear more or less at once or gradually form by form? We don't know but given how long grammaticalization takes, it is unlikely to have emerged completely gradually but given the complexity, it can also not have emerged at once fully formed. I think the sheer complexity of forms making up the system is underappreciated - for instance, to achieve full consistency Fronek has identified over 100 nominal paradigms in Czech (I'm working on a paper on this). It is quite hard to imagine this being learned (in the traditional manner), let alone evolved. Dixon's punctuated equillibria hypothesis (borrowed from biology) could be a part of the answer but I think there's still a plenty to be discovered.