The opposition is not "what" vs. "where" or action vs. location. It is whether that phrase is an indispensible part that follows from the meaning of the predicate, or an optional part without which the predicate will still make sense. When you say ホテルに泊まる
, ホテルに
is not simply expressing the location. What it expresses is more like 'the kind of place to stay in', like hotel, home, hut, etc., and this is a core part of the predicate. So if you use it with something that is purely a place, like 熱海
, it sounds strange:
△ 熱海に泊まる
○ ホテルに泊まる
On the other hand, ホテルで
is merely a location, which is optional, and in fact, で
sounds completely fine with a pure place like 熱海
. It is rather ホテルで
that sounds a little bit akward:
○ 熱海で泊まる
△ ホテルで泊まる
When it comes to 泣く
, the place has no inherent connection with crying, and a locational phrase would be optional; hence you have to use で
.
○ 部屋で泣いている
× 部屋に泣いている