Bode Miller's baby mama claims the Olympic champ is an unfit dad because he lives on a floating-baby-death-trap and gets high a lot -- this according to legal docs.
Sara McKenna -- who Bode knocked up back in 2012 -- is asking for primary custody of their newborn son ... claiming in docs ... Bode's too high a risk to care for their son for 2 related reasons:
1. Bode lives on a yacht in San Diego ... not a safe place for a baby.
2. Bode has drug and alcohol problems.
She also says Bode never even wanted the child ... claiming he asked her to abort it.
TMZ broke the story ... Bode first filed a paternity lawsuit earlier this year, asking for JOINT legal and physical custody.
We reached out to Bode for comment ... so far, no word back.