It’s fairly common knowledge that if you have trouble sleeping you should use your bed only for sleep and sex. It supposedly helps you associate your bedroom with these activities and doing things like watching television or working in bed will make it more difficult to use your bedroom for its intended purposes.
It’s kind of hard to get in the mood for sex if things like laptops and books are strewn about everywhere. It is also worthwhile to note that hearing the sound of your laptop hitting the ground after falling out of a loft bed is a huge mood killer. So keep your work elsewhere and let the bedroom be a safe and relaxing place.