First, create a believable scenario that forces the characters to share a bed, like a travel mishap or a limited - accommodation situation. Then, focus on the characters' reactions. Are they shy? Awkward? Or excited? Build the story around their emotions.
You need to understand the characters well. If it's a fanfic based on existing characters, study their personalities. For example, if it's a couple from a romantic comedy series, they might handle bed sharing with humor. Describe the small details like how they divide the bed space, who takes which side, and what they do during the night. It can add depth to your story.
When writing a bed sharing fanfic, think about the dialogue. The conversation between the characters can reveal a lot about their feelings. They could start with small talk, but as the night progresses, it might turn into a deeper conversation. Also, consider the physical closeness. How do they respond to accidental touches? This can create a lot of sexual or romantic tension depending on the nature of your story, but it should be in line with the overall tone you want to set.