Leibniz and Hume have the same basic distinction in mind, between those truths which are necessary and can be known a priori, and those which are contingent and can only be known a posteriori. The two philosophers use slightly different terminology, and Leibniz would balk at Hume's use of 'relations between ideas' in connection with truths of reason only, but the basic distinction seems to me to be the same.
But the question is more difficult, and is related to a change in logic that happened at the very beginning of the early modern era. The scholastic logicians said that in a proposition (which for them meant a sentence) the predicate is affirmed or denied of the subject. 'Subject' and 'predicate' here are objectively existing things.
Influenced by Descartes, Antoine Arnauld argued that it is not one THING that is predicated of another thing, but one IDEA that is predicated of another idea. Locke (who studied Arnauld's logic carefully) introduced this to the English world (Book IV of the essay is the locus classicus). For example, he sets its down as a principle, that all our knowledge consists in perceiving certain agreements and disagreements between our ideas.
There you have Hume's fork. Before, there was the difference between accidental and essential propositions. An essential proposition is where the predicate belongs in the subject by right, as it were. An accidental proposition is whether the predicate belongs in the subject, but possibly may not. It is not relevant whether this can be known or not. There are (as Aquinas notes) essential propositions which cannot be known because mere humans cannot understand the true meaning of the word which signifies the subject. But the notion of a proposition true in itself but unknowable because the 'subject' is unknowable, is impossible where the proposition consists of ideas stuck together.
In summary: Hume's fork is a consequence of the early modern view of the proposition. The scholastic view was that the proposition connects things. The early modern view is that it connects ideas. The distinction between truths of reason and truths of fact only makes sense on the latter view.
There a number of passages which support this argument & I will make a posting in due course.