The tenses you used are correct.
Nevertheless I'm slightly unhappy with your sentence. The phrase had found himself sounds a bit unnatural in that it leaves one wondering how he came to find himself somewhere. Of course the context might explain that and if so, no change is needed.
Without context one could rephrase it as "At first he couldn't understand where he was because he had awakened in his friend's room" to eliminate the slight uncertainty.