Not recommended. You COULD do this, however if the rats eat the bait and die in the attic, then there will be a horrible odor to deal with. A better solution is to use traps and bait stations outdoors. The rats will have to go outside at some point for food and water. If you bait and or trap them outdoors, then the chances of having an odor issue are greatly diminished.