Can you feed her on your bed and then leave her there to sleep?

My little one was the same and i still struggle with it.