Try prefixing your restore with:
USE MASTER
GO
<your restore statements>
At present, I suspect that you are opening a new query window on the DB you want to restore which will put an implicit
USE BW
GO
in front of the query.
If the DB is in use, it cannot be restored to.