When Sherlock asked, no demanded, that Molly stay at Baker Street after Moriarty revealed himself, she didn't hesitate. Just gathered her things and her cat. As night fell, she, reluctantly, took his bed under the agreement that he attempt to get some sleep on the couch.

In the darkness of the flat, he sat up. He was certain he cried out as he did and now sat getting his breath back. It didn't take long for him to realize someone was holding his hand.
"It's alright, Sherlock." She cooed. "It was just a bad dream. Want me to make you tea?" He hesitantly agreed and listened to her walk away and fondle around for the light switch in the kitchen.
While they waited for the kettle to boil, Sherlock retreated to his mind palace, sorting out the unsettling dream. It was just induced by stress, he knew, but he'd always been prone to them. Since he was young, he'd agonize about things in his head, mull them over, and they'd end up becoming bad dreams. So, as a teenager he began to sleep less; only when he really needed to and usually only after certain tasks were done. It made for a less troublesome and deeper sleep.
The whistle of the kettle brought him back round and Molly presented him with a mug before sitting in "Johns chair", after she'd turned it to face him.
"Why are you awake?"
"Well, you called my name, so I came out to check on you." She spoke this like it was the simplest thing in the world; he called out for her, he must need her, so she followed his voice.
"I did?"
"Yes, I came out and you were mumbling in your sleep. Cursing and tossing a bit."
"I was?"
"Yes, you were quite animated." A small smile graced her lips, but seeing that he was a bit embarrassed or put off, she continued. "I wouldn't have heard or seen any of it if I hadn't heard my name." Sherlock just nodded and sipped at his tea. "You don't have to talk about it, but I'm here if you decide to."
"I called your name?"
"Yes, you called my name."
"And it was loud enough for you hear across the flat?"
"No, well, obviously, if I heard it. But, it wasn't like you shouted or screamed. I just heard you say my name."
"I'm sorry I woke you."
"Its ok." With a gentle shrug, she brought her mug up to her mouth. "I'm just glad I heard you. You seem to feel a little better." There was no answer, he just looked off into space and took a long sip of tea. "Anyway, you can have your bed, if you want. You're going to be busy in the morning and you should be well rested."
"That's not necessary, Molly. You're the guest."
"No, I insist." They argued a bit, but in their exhaustion, decided to simply share the bed; per Sherlocks suggestion.
"Of course it's alright, Molly." He stared at her in the doorway of the bedroom, "Stop being silly, we're not doing anything indecent. Just sleeping." Settling under her set of covers on her belly, facing the closet, Sherlock adjusted himself on his side, staring up at wall. Even years later, they never discuss the first time they shared his bed and held hands all night.