I don't understand the こてん part . I know the phrase is basically "put your head on my shoulder". I've searched around on google and the 肩にこてん part comes up every so often, which means it's a thing. It's just that I can't find it in a dictionary, or that I can't find the full word it's maybe an abbreviation of, or if it's part of a phrase. Thank you!
こてん is a mimetic word to roughly depict "something lightly but suddenly falls or hits something with no or muffled sound". It is indeed very commonly used in light novels when someone's head leans on another's shoulder falling asleep, but not limited to the situation.
三羽のふくろうはハリーのベッドにパサリと軟着陸し、真ん中の大きな灰色のふくろうはコテンと引っくり返って動かなくなった。 （ローリング『ハリー・ポッターシリーズ 03 ハリー・ポッターとアズカバンの囚人』）