how old is your bird?
Sleeping with any bird is dangerous for them, so it's good you stopped that.
Adult birds will see this behavior as sexual, so you don't really want to encourage it unless your bird is extremely young and needs that warmth etc...