I think in the first sentence you’d use 如く rather than 如しに. 如し is an auxiliary verb, not a noun, and is essentially analogous to (の)ようだ, with 如き and 如くbeing conjugations of it analogous to (の)ような and (の)ように/で respectively, hence 如く being the appropriate form to use.
I feel like みたい is more natural, but also a lot more casual. I also recall there being some nuance of the similarity expressed by みたい being visual, or at least bearing some visual/visible characteristics, but I’m not quite sure whether that’s the case, and it doesn’t always seem to fit. Depending on what you’re trying to express though, there might be a better fit (I’m not sure what you mean by sleeping like a bird).
From what I gather 如し/如き/如く isn’t really used anymore, it’s a bit archaic and has almost entirely been replaced by some variation of よう depending on which you use. So instead, 鳥のように寝ました might be more natural/less archaic, and still somewhat formal.