I mean logically if you saw Africans as subhuman wouldn't it be kind of like bestiality to have sex with your African slave? Was there any social/legal/religious pressure not to have sex with Africans because of a similar reasoning?
There was certainly social, legal, and religious pressure, but it by and large...didn't work.
You have to, however, quantify the place before we can have a big discussion. The slave demography led to very different societies on say, Saint Domingue (French Hispaniola, now Haiti) versus the American South.
In the American South, where slave populations were smaller relative to white populations, such liaisons certainly existed and have been dramatized often (as in Twelve Years a Slave), but they did not pose the same "problem" for authorities as they did in Saint Domingue, where a mixed race population emerged that white colonists were deeply threatened by, the gens de couleurs. The gens de couleurs (literally "men of colour") were sometimes planters in their own right, and ranged from poor to extremely wealthy, but faced legal restrictions imposed in an escalatory fashion from the 1750s onwards.
Let's focus on Saint Domingue, because I want to avoid talking about such a dangerously broad subject without a good grounding in the specific.
The degradation of African slaves often made sexual relations easier. Slavery as a philosophical system for ordering human relations groaned under the weight of its own contradictions, so the reality rarely matched ideology, but masters used their control over slaves to justify rape and sexual relations. An overriding obsession of the master's ability to do what he wished characterized plantation culture in Saint Domingue. Each master was the ruler of his own sugar (or coffee) kingdom, and law codes like the Code Noir (1685) were ignored or selectively followed.
In a situation where whites are outnumbered by blacks by about 10/1, as in Haiti, many masters developed at least some kind of attraction, or a fetishization, of their female black or mixed race slaves. In a situation like slavery where slaves are most valued for their bodies and what they can do with them, there is no surprise that masters similarly turned to the lurid.
Laws became far more stringent and restrictive to the gens de coleurs (who on Haiti had previously had theoretically equal status to whites), but there is no indication that they did anything to stop relations.
The results (the creation of an entirely new "race" of people) were obvious and profoundly disturbing to Europeans unfamiliar with the colonial attitude, or to the petits blancs (poorer whites) in Saint Domingue who resented the planters. The effort to persecute mixed-race freemen in Saint Domingue was motivated in part by influence from the Metropole and planters from the metropole.
If you want an interesting examination of this kind of thing in fiction, the relations between master and slave (or slave and slave! It wasn't just binary!) on a Caribbean plantation, the Haitian novel The Infamous Rosalie is a very good place to start. It has an English translation by the University of Nebraska Press, and follows the struggles of Lisette, a domestic plantation slave in Saint Domingue during Makandal's famous slave conspiracy in 1751.
One of the characters is a "Cocotte", who acts as a sexual liaison to the plantation master, another is a mixed-race slave with a quadroon (3/4s white) daughter. As you might gleam, these were complicated relationships. And not very pleasant ones. Slaves were sometimes forced, sometimes not. Some possibly genuinely loved their masters/lovers, but it's hard to say because we have so few testimonials from the slaves themselves, a common issue in slave histories.
Still, injunctions against the practice did very little to stop it. Legal proclamations rarely reached Saint Domingue in much force until the end of the Ancien Regime, few priests were on the island and those that were didn't care, and although not encouraged or regularly talked about by planters, it was also not much condemned, despite the profound frustration of white planter wives, who often found vicious ways to punish the sexual liaisons of husbands (the husbands themselves were beyond reproach, because Haitian slave society was profoundly patriarchal and centered around the master; plantation mistresses were a late addition to the equation).
What helped create the practice? Gender imbalances continued to exist well into the colonial period and even into the early 1800s in many caribbean colonies, with more men than women. The risk of disease and high death rate meant that the Caribbean was generally an unattractive destination for women, because families had high mortalities and family life was unstable and unpleasant.
Especially in the early sugar colonies around the 1660s, it is difficult to speak of a "planter society", because people wanted to make bank and get out before they got killed by some tropical fever.
So what do we have here? Unstable society, horrible power imbalances, looseness and lack of control from the metropole or from traditional regulating institutions like the Church. Fetishization of African and mixed race women, and a scarcity of white women. Seems to make a lot of sense to me that you'd get this situation.
Masters could justify their liaisons as a "patronage". Many masters treated their children through a slave fairly well; for many slave women, this was the only way for their own children to be emancipated, horrible as that is. The Gens De Couleurs as a class grew from these liaisons, and they eventually became a wealthy, if resented, group in the colony on the eve of the Haitian revolution.
For the most part, enslavers in the United States viewed their human property as human. Only a minority subscribed to the theory that black Americans were of some other species because it was widely believed to be contrary to Scripture. There's no separate creation of black people in Genesis, just a single line from which the nations of the world branch off. One of the advocates of polygenesis (separate species for each race), Josiah Nott, spent a fair amount of effort trying to convince his readers that his theory was compatible with the Bible with little success. Slaves were usually seen as people, even when viewed as another species, but people with radically different inner lives and potential. Either way, that's mostly a development of the nineteenth century. There's proslavery argument and writing as early as the 1780s, and inchoate theories and assumptions of white superiority well before that, but the full flower of slavery apologetic coincides with the rise of immediate abolition movement of the 1830s.
There were social strictures against having sex with one's slaves, but they were highly voluntary. "Fancy" slaves, who were bought to be used sexually were a well-established part of the market and often advertised as such. Lighter skin often fetched a higher price. Light-skinned slaves that look like the master of the house were a common item of gossip. If you had the right white father and lived in the right area, you might even be set up as a free person of considerable prosperity, though that's mostly restricted to the Cotton states and most common in Louisiana, which inherited a situation that has a lot in common with Haiti's. The free people of color remained a distinctive class there up as late as Reconstruction, though not one their increasingly American white neighbors were happy with.