Yes, it's possible. Fanfiction can take many different turns. Some writers could be exploring the idea of forced proximity between Harry and Snape to build a different kind of relationship dynamic. Maybe it's about Harry being magically or situationally forced onto Snape's bed as a means to start a conversation or resolve some long - standing misunderstandings between them, without any improper undertones.
One possible plotline could be a magical accident. Maybe a spell backfires during a Defense Against the Dark Arts class and Harry is teleported onto Snape's bed. Snape then has to figure out how to reverse the spell while also dealing with his initial irritation towards Harry. This could lead to a series of comical exchanges between them as they try to work together to fix the situation.
Well, it could be like this. Harry is exploring an old attic in the Weasley's house and stumbles upon a magical object that, when touched, forces him onto a nearby bed. It turns out to be a charm placed by a young Weasley ancestor as a joke. The family then works together to figure out how to break the charm. They try different spells and potions, and in the process, there are lots of funny moments and family bonding.
Perhaps in this fanfiction, Harry is forced onto the bed by a mysterious force while he's in the Forbidden Forest. It could be related to some ancient magic that the forest holds. He then has to communicate with the forest creatures, like the centaurs or the bowtruckles, to find a way to get off the bed. The centaurs might offer their wisdom about the strange magic, and the bowtruckles could help him find a special plant or object that has the power to break the spell. This would be an adventure - filled plotline that doesn't involve any inappropriate content.
There could be an experienced fanfiction writer who has explored all the common storylines and now wants to venture into more out - there ideas. They might think that the relationship between Harry and Snape has a lot of untapped potential for a story like this, where they are forced into an extremely close and awkward situation.
One possible plot could be that it's a prank gone wrong. Maybe some magical spell misfires and Harry ends up tied to Snape's bed accidentally. Then Snape discovers him and there is a lot of anger and confusion as they try to figure out how to undo the situation without getting into more trouble.
Harry would probably be quite resentful at first. He might think Snape is just being his usual unfair self. So, he would be sulky and do the tasks reluctantly.
One reason could be a misfired spell by another character. For example, if a young wizard was experimenting with a transportation spell and it backfired, it could accidentally force Harry to be attached to Snape in this 'ride' situation. Another reason might be a plot by a dark wizard who wants to see chaos at Hogwarts. They figure that forcing Harry and Snape together in this strange way would disrupt the normal order of things.
Obviously, Harry Potter and Severus Snape are the main characters. Harry is the one who is forced into this situation, and Snape is the one he has to please. But other characters like Hermione and Ron could also be involved. They might try to help Harry out of this difficult situation or be affected by the consequences of Harry's actions to please Snape.
Perhaps in the fanfiction, Harry is magically bound to please Snape in academic tasks. So, he has to study extra hard in Potions class and other subjects Snape is involved in. This might result in a transformation of their relationship, from animosity to a grudging respect as Snape starts to see Harry's efforts.