While studying modals in a book written by nonnative speaker, I found that Might & Could are used for suggestion as well i.e.
You might/ could sleep in my room today.
You might / could have slept in my room. (Past)

The book says that could and might can be used for possibility in past as well. i.e.
He might / could have downloaded Windows7 in his home.

Question: Me, being a nonnative speaker, how will I come to know about a sentence if it means a possibility or suggestion.

Could you please clear my confusion?

with kind regards