Upvote:7
It's not legal, but if they only enforce the duration of stay with passport stamps, or if they have an entry/exit database that can't match your two passports to the same person for some reason, you may be able to get away with it. It's pretty risky, though. If you are caught, you could suffer some fairly serious consequences, likely including not being able to go to Bulgaria for at least a few years (I don't know whether this would affect your ability to enter the Schengen area; Bulgaria isn't yet territorially part of the area, but it has joined the Schengen acquis so it participates in various Schengen institutions).
If you want to stay in Bulgaria for 180 days it's probably better to find a way to get a type D visa that will allow you to do so legally.