Homonyms originate in basically one of two ways. Either they have different origins, and sound the same simply by coincidence - either a sound change resulted in two previously distinct words sounding the same, or a foreign word was borrowed that happened to sound like an existing word - or else the two words began as variant meanings of the same word (also known as polysemy) that diverged enough that their original similarity was lost.
In the case that two languages share similar pairs of homonyms like the ones you mentioned, it is possible that the similarity is a complete coincidence, but very unlikely. It is more likely that they originate in polysemy. I can see two ways for this to happen:
- They originate independently, but with similar logic. For example, it is quite logical to connect "morning" and "tomorrow" - one might begin by saying "next morning", then abbreviating to just "morning", then broadening the meaning to the entire day. I'm not sure if "morgen" and "утре" originated independently, but it's very plausible.
- The connection originates in one language, then calqued into another language. Calquing occurs through exposure between two languages, when a phrase or compound is borrowed through literal translation. This appears to be the case for Schloss and замок. From Wiktionary
Borrowing from Polish zamek, which is a calque via Czech zámek of Middle High German sloz (“lock, keep”), which, in turn, is a calque of Latin clūsa (“lock, fort, fortification”). Attested from the 17th century. Related to замыкать (zamykatʹ) (замкнуть (zamknut))