In a petition for habeas corpus, Cohen’s attorneys said that officials with the federal Bureau of Prisons had conditioned his transition to home confinement on an “unconstitutional demand” that he not engage with “any kind of media” and stay off of social media platforms.