"I've had a stomachache since yesterday" - this means the stomachache started yesterday and hasn't gone yet. 昨日からお腹が痛い。
"I got a stomachache from/because of yesterday" - when you say it like this, you are giving an explanation about why you have a stomachache, and the listener already knows the context. E.g. if you both went to a party yesterday and ate too much, the next day you could say "I got a stomachache from yesterday". The listener knows that this is because you ate too much at the party.