Hi BoP
Unfortunately, this is a complicated topic. As far as I know, it is addressed in
A Comprehensive Grammar of the English Language. I don't have this book on hand at the moment, so I can't research or quote anything from it.
Here, then, is my own feeble effort to explain:
As far as I know, there are 'VERB + PREPOSITION + NOUN' combinations in
which the noun serves as an object and if the 'preposition+noun'
combination tells you 'whom' or 'what' (rather than where, when, how,
etc.), then passivisation is possible. It might be argued that
the sentence 'He is going to school' tells you both 'where' and
'what'. However, the question about 'where' is much more natural
than a question about 'what':
Where is he going? (natural question)
What is he going to? (possible, but awkward) Likewise, a passivisation of this sentence also sounds unnatural and awkward
It might also be argued that 'Someone is sleeping in my bed'
tells you both 'where' and 'what', however in my opinion the
sense of 'what' is stronger -- or at least no less natural than
'where':
What is someone sleeping in? Where is someone sleeping?
Because the sense of 'what' is strong, that is likely why passivisation works here:
My bed is being slept in.
The verb 'sleep' is generally intransitive, however there are some transitive usages:
That RV sleeps six people.
I slept the day away.
I suppose 'sleep' is technically intransitive in the sentence
'Someone is sleeping in my bed.' But you might look at it as similar in
meaning to 'Someone is occupying my bed' (i.e.
'my bed' is clearly a direct object).
I hope someone else will be able to explain this all better than I can.